]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Re-apply r306516 (by cem):
authorkib <kib@FreeBSD.org>
Tue, 4 Oct 2016 17:01:24 +0000 (17:01 +0000)
committerkib <kib@FreeBSD.org>
Tue, 4 Oct 2016 17:01:24 +0000 (17:01 +0000)
commit559623d89a333c26328a6c8eff2b07d8c45b7773
tree9ea73ab5a922a17426c5b7c848e98b430874b119
parent246657194c38f0ba299d487f7451fc358d9c132e
Re-apply r306516 (by cem):

Reduce the cost of TLB invalidation on x86 by using per-CPU completion flags

Reduce contention during TLB invalidation operations by using a per-CPU
completion flag, rather than a single atomically-updated variable.

On a Westmere system (2 sockets x 4 cores x 1 threads), dtrace measurements
show that smp_tlb_shootdown is about 50% faster with this patch; observations
with VTune show that the percentage of time spent in invlrng_single_page on an
interrupt (actually doing invalidation, rather than synchronization) increases
from 31% with the old mechanism to 71% with the new one.  (Running a basic file
server workload.)

Submitted by: Anton Rang <rang at acm.org>
Reviewed by: cem (earlier version)
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8041
sys/amd64/amd64/mp_machdep.c
sys/amd64/include/pcpu.h
sys/i386/include/pcpu.h
sys/x86/include/x86_smp.h
sys/x86/x86/mp_x86.c