Cc: Christoph Lameter <clameter@...>, Robin Holt <holt@...>, Avi Kivity <avi@...>, Izik Eidus <izike@...>, Nick Piggin <npiggin@...>, <kvm-devel@...>, Benjamin Herrenschmidt <benh@...>, Peter Zijlstra <a.p.zijlstra@...>, <linux-kernel@...>, <linux-mm@...>, <daniel.blueman@...>, Hugh Dickins <hugh@...>
On Tue, Jan 29, 2008 at 06:28:05PM -0600, Jack Steiner wrote:
If you don't have a pin, then things like invalidate_range in
remap_file_pages can't be safe as writes through the external TLBs can
keep going on pages in the freelist. For you to be safe w/o a
page-pin, you need to return in the direction of invalidate_page
inside ptep_clear_flush (or anyway before
page_cache_release/__free_page/put_page...). You're generally not safe
with any invalidate_range that may run after the page pointed by the
pte has been freed (or can be freed by the VM anytime because of being
unpinned cache).
--