Re: [PATCH 1/8] block: limit default readahead size for small devices

From: Jeff Moyer
Date: Tue Nov 22 2011 - 09:23:23 EST


Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> writes:

> In a better world, userspace would run a
> work-out-what-readahead-size-to-use script each time a distro is
> installed and when new storage devices are added/detected. Userspace
> would then remember that readahead size for subsequent bootups.

I'd be interested to hear what factors you think should be taken into
account by such a script. I agree that there are certain things, like
timing of reads of different sizes, or heuristics based on the size of
installed memory, which could contribute to the default readahead size.
However, other things, like memory pressure while running the desired
workload, can't really be measured by an installer or one-time script.

> In the real world, we shovel guaranteed-to-be-wrong guesswork into the
> kernel and everyone just uses the results. Sigh.

I'm not sure a userspace tool is the panacea you paint. However, if you
can provide some guidance on what you think could make things better,
I'm happy to give it a go.

Cheers,
Jeff
--
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/