Re: [PATCH] mm/filemap.c: unconditionally call mark_page_accessed

Rik van Riel
2007-03-15T15:06:58Z

Nick Piggin wrote:
> On Thu, Mar 15, 2007 at 11:39:14AM +0100, Peter Zijlstra wrote:
>> On Wed, 2007-03-14 at 15:58 -0400, Ashif Harji wrote:
>>> This patch unconditionally calls mark_page_accessed to prevent pages,
>>> especially for small files, from being evicted from the page cache despite
>>> frequent access.
>> Since we're hackling over the use-once stuff again...
>>
>> /me brings up: http://marc.info/?l=linux-mm&m=115316894804385&w=2 and
>> ducks.
>
> Join the club ;)
>
> http://groups.google.com.au/group/linux.kernel/msg/7b3237b8e715475b?hl=en&
>
> I can't find the patch where I actually did combine it with a PG_usedonce
> bit, but the end result is pretty similar to your patch.

Except for the bit where vmscan throws away page cache pages
with PageReferenced set, unless they are mapped :)

Also, pages that only got accessed once will have the referenced
bit set too, so your patch gives no way to distinguish between
pages that were accessed once and pages that were accessed multiple
times.

> And I think one
> or two others have also independently invented the same thing.
>
> So it *has* to be good, doesn't it? ;)

No argument there :)

--
Politics is the struggle between those who want to make their country
the best in the world, and those who believe it already is. Each group
calls the other unpatriotic.