Messages in this thread | | | Date | Fri, 11 Feb 2005 09:52:39 +0100 | From | Andrea Arcangeli <> | Subject | Re: [RFC] Changing COW detection to be memory hotplug friendly |
| |
On Fri, Feb 11, 2005 at 07:23:09AM +0000, Hugh Dickins wrote: > And it's fine for the behaviour to be somewhat undefined in this > peculiar case: the important thing is just that the page must not > be freed and reused while I/O occurs, hence get_user_page raising > the page_count - which I'm _not_ proposing to change!
Ok, I'm quite convinced it's correct now. The only thing that can make mapcount go up without the lock on the page without userspace intervention (and userspace intervention would make it an undefined behaviour like in my example with fork), was the swapin, and you covered it by moving the unlock after page_add_anon_rmap (so mapcount changes atomically with the page_swapcount there too). Swapoff was already doing it under the page lock.
Then we should use the mapcount/swapcount in remove_exclusive_swap_page too. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |