]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
amd64: store per-cpu allocations subtracted by __pcpu
authorMateusz Guzik <mjg@FreeBSD.org>
Wed, 12 Feb 2020 11:12:13 +0000 (11:12 +0000)
committerMateusz Guzik <mjg@FreeBSD.org>
Wed, 12 Feb 2020 11:12:13 +0000 (11:12 +0000)
commitfb886947d97375ea9906fa1396f83573b6d0674b
treebc47d67f771fbc25572b79c4d056fe3e80f9d2cc
parent3acb6572fc0ef19119240a319873fa75fd597f28
amd64: store per-cpu allocations subtracted by __pcpu

This eliminates a runtime subtraction from counter_u64_add.

before:
mov    0x4f00ed(%rip),%rax        # 0xffffffff80c01788 <numfullpathfail4>
sub    0x808ff6(%rip),%rax        # 0xffffffff80f1a698 <__pcpu>
addq   $0x1,%gs:(%rax)

after:
mov    0x4f02fd(%rip),%rax        # 0xffffffff80c01788 <numfullpathfail4>
addq   $0x1,%gs:(%rax)

Reviewed by: jeff
Differential Revision: https://reviews.freebsd.org/D23570
sys/amd64/include/counter.h
sys/amd64/include/pcpu.h