Date: Thu, 8 Jul 2010 03:35:00 +0000 (UTC) From: Alan Cox <alc@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/amd64/amd64 cpu_switch.S pmap.c Message-ID: <201007080357.o683vSA4007382@repoman.freebsd.org>
index | next in thread | raw e-mail
alc 2010-07-08 03:35:00 UTC
FreeBSD src repository
Modified files:
sys/amd64/amd64 cpu_switch.S pmap.c
Log:
SVN rev 209789 on 2010-07-08 03:35:00Z by alc
Correctly maintain the per-cpu field "curpmap" on amd64 just like we
do on i386. The consequences of not doing so on amd64 became apparent
with the introduction of the COUNT_IPIS and COUNT_XINVLTLB_HITS
options. Specifically, single-threaded applications were generating
unnecessary IPIs to shoot-down the TLB on other processors. However,
this is clearly nonsensical because a single-threaded application is
only running on the current processor. The reason that this happens
is that pmap_activate() is unable to properly update the old pmap's
field "pm_active" without the correct "curpmap". So, in effect, stale
bits in "pm_active" were leading pmap_protect(), pmap_remove(),
pmap_remove_pages(), etc. to flush the TLB contents on some arbitrary
processor that wasn't even running the same application.
Reviewed by: kib
MFC after: 3 weeks
Revision Changes Path
1.171 +10 -12 src/sys/amd64/amd64/cpu_switch.S
1.706 +2 -0 src/sys/amd64/amd64/pmap.c
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007080357.o683vSA4007382>
