How to prevent other CPU from accessing a set of pages before
calling pmap_remove_all function
MingyanGuo
guomingyan at gmail.com
Thu Sep 10 06:55:57 UTC 2009
Hi all,
I find that function pmap_remove_all for arch amd64 works with a time window
between reading & clearing the PTE flags(access flag and dirty flag) and
invalidating its TLB entry on other CPU. After some discussion with Li
Xin(cced), I think all the processes that are using the PTE being removed
should be blocked before calling pmap_remove_all, or other CPU may dirty the
page but does not set the dirty flag before the TLB entry is flushed. But I
can not find how to block them to call the function. I read the function
vm_pageout_scan in file vm/vm_pageout.c but can not find the exact method it
used. Or I just misunderstood the semantics of function pmap_remove_all ?
Thanks in advance.
Regards,
MingyanGuo
More information about the freebsd-hackers
mailing list