diff options
author | marcel <marcel@FreeBSD.org> | 2010-03-22 04:24:19 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2010-03-22 04:24:19 +0000 |
commit | a52af8cfd6b7cd34e34ab9dd42b772901300bf9a (patch) | |
tree | 57afed6a41949eba90c2a33eb465e77391387a9e /contrib | |
parent | faf8fb6e5bf0cc48dddf676444cadac0a1c57b43 (diff) | |
download | FreeBSD-src-a52af8cfd6b7cd34e34ab9dd42b772901300bf9a.zip FreeBSD-src-a52af8cfd6b7cd34e34ab9dd42b772901300bf9a.tar.gz |
Drop the pmap argument to pmap_invalidate_page(). It's not used other
than in a KASSERT. The KASSERT is broken in that it's done outside the
critical section and as such isn't protected against CPU migration.
Improve pmap_invalidate_page() as follows:
o calculate vhpt_ofs inside the critical region for exactly the same
reason.
o calculate the tag outside the FOREACH loop, as it's loop-invariant.
This is more efficient.
o Replace the test and set with an atomic cmpset operation because we
are changing other CPU's VHPT tables and this avoids invalidating
after the entry got modified. Not necessarily a problem, but better
safe than sorry.
Diffstat (limited to 'contrib')
0 files changed, 0 insertions, 0 deletions