Re: [PATCH 9/9] readahead: record mmap read-around states infile_ra_state

From: Andrew Morton
Date: Fri Apr 10 2009 - 19:41:46 EST


On Fri, 10 Apr 2009 14:10:06 +0800
Wu Fengguang <fengguang.wu@xxxxxxxxx> wrote:

> Mmap read-around now shares the same code style and data structure
> with readahead code.
>
> This also removes do_page_cache_readahead().
> Its last user, mmap read-around, has been changed to call ra_submit().
>
> The no-readahead-if-congested logic is dumped by the way.
> Users will be pretty sensitive about the slow loading of executables.
> So it's unfavorable to disabled mmap read-around on a congested queue.

Did you verify that the read-congested code ever triggers?

It used to be (and probably still is) the case that
bdi_read_congested() is very very rare, because the read queue is long
and the kernel rarely puts many read requests into it. You can of
course create this condition with a fake workload with may
threads/processes, but it _is_ fake.

Some real-world workloads (databases?) will of course trigger
bdi_read_congested(). But they're usually doing fixed-sized reads, and
if we're doing _any_ readahead/readaround in that case, readahead is
busted.

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