Re: [PATCH] mm: add config for readahead window
From: Jan Kara
Date: Tue Mar 20 2018 - 16:17:39 EST
On Fri 16-03-18 18:49:08, Wei Wang wrote:
> Android devices boot time benefits by bigger readahead window setting from
> init. This patch will make readahead window a config so early boot can benefit
> by it as well.
>
>
> On Fri, Mar 16, 2018 at 11:25 AM Wei Wang <wvw@xxxxxxxxxx> wrote:
>
> From: Wei Wang <wvw@xxxxxxxxxx>
>
> Change VM_MAX_READAHEAD value from the default 128KB to a configurable
> value. This will allow the readahead window to grow to a maximum size
> bigger than 128KB during boot, which could benefit to sequential read
> throughput and thus boot performance.
>
> Signed-off-by: Wei Wang <wvw@xxxxxxxxxx>
Just for record we had VM_MAX_READAHEAD changed to 512 in all SUSE
distributions for quite some years. But just recently we were re-evaluating
it and we are finding less and less reasons to keep this setting to 512 -
with newer storage benefits become marginal and the overhead of reading
more unnecessarily in some other corner cases is visible as well (I still
have somewhere reports from 0-day robot that complained to me about two
performance regressions coming from increased default readahead window).
So for your specific case it might make sense to increase the window when
you have a control of both the HW and the kernel but in general I tend to
currently agree with Linus & co. that the current default is probably fine.
I don't have a strong opinion on whether your ~90ms of boot time are good
enough justification for a kernel config option...
Honza
--
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR