Quoting Samuel Thibault (2014-12-10 00:07:28)
> Hello,
> 
> Justus Winter, le Tue 09 Dec 2014 18:06:18 +0100, a écrit :
> > Previously, `PAGE_THRESHOLD' was defined instead of
> > `PAGE_COPY_THRESHOLD', preventing the optimization of memory copy
> > operations using `vm_copy'.
> 
> Actually this currently doesn't make any difference since the
> Makefile rules end up compiling sysdeps/i386/i586/memcpy{,_chk}.S,
> i386/i586/memcopy.h, i386/memcopy.h instead...  Also, #if
> PAGE_COPY_THRESHOLD doesn't like PAGE_COPY_THRESHOLD being
> 2*__vm_page_size, it ends up considering it false. Also, the rtld magic
> in elf/ doesn't manage to determine that it also needs to include
> wordcopy.os.  I circumvented those issues in hackish ways to get some
> libcs, they are being uploaded to these places:

Uh.  But many thanks for looking into this.  Here is my microbenchmark
with these.  It doesn't show anything unexpected other than that gcc
is smart enough to replace my memcpy with a call to memcpy despite my
efforts to make it stop doing that.

% for w in 586asm 1page 2page 3page 4page inftypage ; do ln -vfs libc.so.$w 
libc.so.0.3 ; env LD_LIBRARY_PATH=. bash driver.bash ; done
‘libc.so.0.3’ -> ‘libc.so.586asm’
size iterations      gcc_memcpy      memcpy          vm_copy
4096    8388608      5.82            5.78            14.46
8192    4194304      5.65            5.67            7.30
12288    2796202      5.71            5.68            4.79
16384    2097152      5.86            5.87            3.65
32768    1048576      7.10            7.09            1.81
65536     524288      7.15            7.11            0.93
‘libc.so.0.3’ -> ‘libc.so.1page’
size iterations      gcc_memcpy      memcpy          vm_copy
4096    8388608      16.13           16.05           14.81
8192    4194304      8.18            8.07            7.37
12288    2796202      5.49            5.42            4.89
16384    2097152      4.11            4.06            3.64
32768    1048576      2.03            2.04            1.85
65536     524288      1.05            1.08            0.94
‘libc.so.0.3’ -> ‘libc.so.2page’
size iterations      gcc_memcpy      memcpy          vm_copy
4096    8388608      5.64            5.62            14.61
8192    4194304      8.13            7.99            7.34
12288    2796202      5.48            5.54            4.89
16384    2097152      4.05            4.08            3.63
32768    1048576      2.09            2.07            1.84
65536     524288      1.03            1.04            0.92
‘libc.so.0.3’ -> ‘libc.so.3page’
size iterations      gcc_memcpy      memcpy          vm_copy
4096    8388608      5.67            5.92            16.49
8192    4194304      5.71            5.55            7.27
12288    2796202      5.44            5.43            4.94
16384    2097152      4.10            4.05            3.64
32768    1048576      2.05            2.04            1.90
65536     524288      1.15            1.12            1.31
‘libc.so.0.3’ -> ‘libc.so.4page’
size iterations      gcc_memcpy      memcpy          vm_copy
4096    8388608      5.66            5.67            14.87
8192    4194304      5.53            5.69            7.77
12288    2796202      5.76            5.71            5.02
16384    2097152      4.09            4.15            3.82
32768    1048576      2.39            2.06            1.83
65536     524288      1.07            1.04            0.95
‘libc.so.0.3’ -> ‘libc.so.inftypage’
size iterations      gcc_memcpy      memcpy          vm_copy
4096    8388608      6.15            5.95            14.85
8192    4194304      5.45            5.41            7.85
12288    2796202      5.89            6.22            4.90
16384    2097152      5.92            5.93            3.65
32768    1048576      6.23            6.17            1.80
65536     524288      6.14            6.19            0.96

> so people can try them.

Yes, on real workloads.

> Do not install them in /lib/i386-gnu! That does not seem to be
> working yet, boot hangs early, apparently when starting pflocal.

:/ I wonder why.

Justus

Reply via email to