]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
amd64: switch pagecopy from non-temporal stores to rep movsq
authormjg <mjg@FreeBSD.org>
Thu, 31 May 2018 09:56:02 +0000 (09:56 +0000)
committermjg <mjg@FreeBSD.org>
Thu, 31 May 2018 09:56:02 +0000 (09:56 +0000)
commit8a9e7fed77d556c8716b2a358cd8a39c48294b5a
treebc9ef9f09067d7367e4dc8036f22a75760a41481
parent34e8800cc7dc40b3dec5db112d8d43f5e282018c
amd64: switch pagecopy from non-temporal stores to rep movsq

The copied data is accessed in part soon after and it results with additional
cache misses during a -j 1 buildkernel WITHOUT_CTF=yes KERNFAST=1, as measured
with pmc stat.

before:
       256165411  cache-references # 0.003 refs/inst
        15105408  cache-misses # 5.897%
           20.70  real # 99.67% cpu
           13.24  user # 63.94% cpu
            7.40  sys # 35.73% cpu

after:
       256764469  cache-references # 0.003 refs/inst
        11913551  cache-misses # 4.640%
           20.70  real # 99.67% cpu
           13.19  user # 63.73% cpu
            7.44  sys # 35.95% cpu

Note the real time did not change, but traffic to RAM was reduced (multiple
measurements performed with switching the implementation at runtime).
Since nobody else is using non-temporal for this and there is no apparent
benefit at least these days, don't use them either.

Side note is that pagecopy arguments should probably get reversed to not
have to flip them around in the primitive.

Discussed with: jeff
sys/amd64/amd64/support.S