On 17 Nov 1998 02:21:14 +0100, Zlatko Calusic <Zlatko.Calusic@CARNet.hr>
said:
> "Stephen C. Tweedie" <sct@redhat.com> writes:
>> No, we don't. We don't evict just-read-in data, because we mark such
>> pages as PG_Referenced. It takes two complete shrink_mmap() passes
>> before we can evict such pages.
> I didn't find this in the source (in fact, add_to_page_cache clears
> PG_referenced bit, if I understood source correctly). But, see below.
You didn't understand the source correctly. :) There is an extra
bracket you missed:
page->flags = (page->flags & ~((1 << PG_uptodate) | (1 << PG_error))) | (1 << PG_referenced);
We clear PG_uptodate and PG_error, but we _set_ PG_referenced.
> I must agree entirely, because with small patch you can find below,
> performance is very very good. Thanks to marking readahead pages as
> referenced, I've been able to see exact behaviour that I wanted for a
> long time.
Excellent.
--Stephen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/