Re: unexpected paging during large file reads in 2.1.127

Stephen C. Tweedie (sct@redhat.com)
Mon, 16 Nov 1998 23:05:56 GMT


Hi,

On Mon, 16 Nov 1998 21:48:35 +0100 (CET), Rik van Riel
<H.H.vanRiel@phys.uu.nl> said:

> On Mon, 16 Nov 1998, Stephen C. Tweedie wrote:
>> The real cure is to disable page aging in the page cache completely.
>> Now that we have disabled it for swap, it makes absolutely no sense at
>> all to keep it in the page cache.

> This is not entirely true. There is a major difference
> between pages in the page cache and pages that can go
> into swap. The latter kind will always be mapped inside
> the address space of a program (where it gets proper
> aging and stuff)

No it doesn't, that's what I'm saying. Linus removed swap page aging in
the recent kernels. That throws the balance between swap and cache
completely out of the window: removing the page cache aging is necessary
to restore balance. There are many many reports of massive cache growth
on the latest kernels as a result of this.

> Now we can get severe problems with readahead when we
> are evicting just read-in data because it isn't mapped,

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.

> resulting in us having to read it again and doing double
> I/O with a badly performing program.

The reason why this used to happen was because the readahead failed to
mark the new page as PG_Referenced. I've been saying for _months_ that
the right fix was to mark them referenced rather than to do page aging
(and all of my benchmarks, without exception, back this up).

--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/