Re: [patch 2/13] remove pages from the LRU in __free_pages_ok()

David S. Miller (davem@redhat.com)
Sun, 28 Jul 2002 23:10:17 -0700 (PDT)


From: Linus Torvalds <torvalds@transmeta.com>
Date: Sun, 28 Jul 2002 23:16:24 -0700 (PDT)

[ This is Linus speaking in all the quoted material below... ]

> But the thing is, nobody should normally have a reference to such a
> page anyway. The only way they happen is by something mapping a
> page from user space, and saving it away, while the user space goes
> away and drops its references to the page.
...
But hopefully nobody should have the problematic last reference to a LRU
page _except_ the user space itself. That should be safe for page cache
pages thanks to the truncate change.

[ Now DaveM is talking :-) ]

So let's say that we have a page going out a socket. The socket's FD
has multiple references so when the user exit()'s the anonymous page
is still "in-flight" but the socket isn't closed and thus we won't
wait for the write to complete.

So when the user's reference is dropped, does that operation kill it
from the LRU or will the socket's remaining reference to that page
defer the LRU removal?
-
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/