lkml.org 
[lkml]   [2000]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH *] VM patch for 2.4.0-test8
From
Date
>>>>> "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/

\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.070 / U:27.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site