Messages in this thread | | | Date | Mon, 12 Apr 2010 11:19:30 -0400 | From | Rik van Riel <> | Subject | Re: [PATCH -v2] rmap: make anon_vma_prepare link in all the anon_vmas of a mergeable VMA |
| |
On 04/12/2010 10:40 AM, Peter Zijlstra wrote:
> So the reason page->mapping isn't cleared in page_remove_rmap() isn't > detailed beyond a (possible) race with page_add_anon_rmap() (which I > guess would be reclaim trying to unmap the page and a fault re-instating > it). > > This also complicates the whole page_lock_anon_vma() thing, so it would > be nice to be able to remove this race and clear page->mapping in > page_remove_rmap().
For anonymous pages, I don't see where the race comes from.
Both do_swap_page and the reclaim code hold the page lock across the entire operation, so they are already excluding each other.
Hugh, do you remember what the race between page_remove_rmap and page_add_anon_rmap is/was all about?
I don't see a race in the current code...
| |