On Mon, Apr 28, 2014 at 11:25:40AM +0200, Peter Zijlstra wrote: > > So in the interval when zap_pte_range() has brought page_mapcount() > > down to 0, but not yet flushed TLB on all mapping cpus, it looked as > > if we still had a problem - neither try_to_unmap() nor page_mkclean() > > would take the lock either of us rely upon for serialization. > > > > But pageout()'s preliminary is_page_cache_freeable() check makes > > it safe in the end: although page_mapcount() has gone down to 0, > > page_count() remains raised until the free_pages_and_swap_cache() > > after the TLB flush. > > > > So I now believe we're safe after all with either patch, and happy > > for Linus to go ahead with his. > > OK, so I'm just not seeing that atm. Will have another peek later, > hopefully when more fully awake. Sigh.. I suppose I should do more mm/ stuff, I'm getting real rusty. So it looks like we also have a page-ref per map, every time we install a page (->fault) we grab an extra ref. So yes, we'll have >2 refs until the final free_page_and_swap_cache() -- To unsubscribe from this list: send the line "unsubscribe linux-arch" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html