]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Clearing a page table entry's accessed bit (PG_A) and setting the
authoralc <alc@FreeBSD.org>
Sun, 25 Apr 2010 20:40:45 +0000 (20:40 +0000)
committeralc <alc@FreeBSD.org>
Sun, 25 Apr 2010 20:40:45 +0000 (20:40 +0000)
commit019a1d16bacaa7783b857c309ce61d655e899904
treeec9ad7b26fa81cd6cf0b255dbb08eeabdf74fed4
parent8156e27dd79d633bbb41f44cf030e93cdcd15889
Clearing a page table entry's accessed bit (PG_A) and setting the
page's PG_REFERENCED flag in pmap_protect() can't really be justified.
In contrast to pmap_remove() or pmap_remove_all(), the mapping is not
being destroyed, so the notion that the page was accessed is not lost.
Moreover, clearing the page table entry's accessed bit and setting the
page's PG_REFERENCED flag can throw off the page daemon's activity
count calculation.  Finally, in my tests, I found that 15% of the
atomic memory operations being performed by pmap_protect() were only
to clear PG_A, and not change protection.  This could, by itself, be
fixed, but I don't see the point given the above argument.

Remove a comment from pmap_protect_pde() that is no longer meaningful
after the above change.
sys/amd64/amd64/pmap.c
sys/i386/i386/pmap.c