Re: [PATCH *] VM patch for 2.4.0-test8

From: Juan J. Quintela (quintela@fi.udc.es)
Date: Thu Sep 14 2000 - 01:11:40 EST


>>>>> "david" == David S Miller <davem@redhat.com> writes:

david> In page_launder() about halfway down there is this sequence of tests
david> on LRU pages:

david> if (!clearedbuf) {
david> ...
david> } else if (!page->mapping) {
david> ...
david> } else if (page_count(page) > 1) {
david> } else /* page->mapping && page_count(page) == 1 */ {
david> ...
david> }

david> Above this sequence we've done a page_cache_get. For the final case
david> in the tests above (page->mapping != NULL && page_count(page) == 1)
david> have you checked if this ever happens or is even possible?

david> If the page is a page cache page (ie. page->mapping != NULL) it
david> should hold a reference. Adding in our reference, the count should
david> always thus be > 1.

david> What did I miss?

I think nothing, I suppose that riel means > 2 and == 2, if we arrive
there when a page count of 1 we are in problems as you have told.

/me doing greping ...... <some time later>

I can only see one place where we add a page to the page cache and we
don't increase its page count, and it is in grow_buffers(). Could
somebody explain me _why_ we don't need to do a page_cache_get(page)
in that function?

Later, Juan.

-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Sep 15 2000 - 21:00:23 EST