]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Optimize i386 pmap_extract_and_hold().
authorkib <kib@FreeBSD.org>
Fri, 25 May 2018 16:29:22 +0000 (16:29 +0000)
committerkib <kib@FreeBSD.org>
Fri, 25 May 2018 16:29:22 +0000 (16:29 +0000)
commitb8cb7e293ac0fd868afa45a194304b420127af42
tree4f5e4ac77a96ec03eb5d56f37d4f9cdb313eed4c
parent4778ea9ef70a4f004794b04dd872495e8ffe7fbd
Optimize i386 pmap_extract_and_hold().

In particular, stop using pmap_pte() to read non-promoted pte while
walking the page table.  pmap_pte() needs to shoot down the kernel
mapping globally which causes IPI broadcast.  Since
pmap_extract_and_hold() is used for slow copyin(9), it is very
significant hit for the 4/4 kernels.

Instead, create single purpose per-processor page frame and use it to
locally map page table page inside the critical section, to avoid
reuse of the frame by other thread if context switched.

Measurement demostrated very significant improvements in any load that
utilizes copyin/copyout.

Found and benchmarked by: bde
Sponsored by: The FreeBSD Foundation
sys/i386/i386/pmap.c
sys/i386/include/pcpu.h