Re: [PATCH][RFC] evict streaming IO cache first

From: Andrew Morton
Date: Tue Jul 15 2008 - 16:50:15 EST


On Tue, 15 Jul 2008 16:09:48 -0400
Rik van Riel <riel@xxxxxxxxxx> wrote:

> This patch still needs some testing under various workloads
> on different hardware - the approach should work but the
> threshold may need tweaking.
>

More than "some"!

>
> When there is a lot of streaming IO going on, we do not want
> to scan or evict pages from the working set. The old VM used
> to skip any mapped page, but still evict indirect blocks and
> other data that is useful to cache.

I'd be surprised if indirect blocks are getting kicked - they tend to
be awfully sticky due to frequent touch_buffer()s or equivalent.

inode blocks tend to be pretty sticky too - this is affected a lot by
whether or not atime updates are enabled.

directory blocks might be less sticky, but that might be what we want
to happen.

> This patch adds logic to skip scanning the anon lists and
> the active file list if most of the file pages are on the
> inactive file list (where streaming IO pages live), while
> at the lowest scanning priority.
>
> If the system is not doing a lot of streaming IO, eg. the
> system is running a database workload, then more often used
> file pages will be on the active file list and this logic
> is automatically disabled.
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/