Re: [PATCH -mm -v4 3/5] mm, swap: VMA based swap readahead

From: Andrew Morton
Date: Thu Sep 14 2017 - 17:21:47 EST


On Thu, 14 Sep 2017 22:14:46 +0900 Minchan Kim <minchan@xxxxxxxxxx> wrote:

> > Now. Users can choose between VMA based readahead and original
> > readahead via a knob as follow at runtime,
> >
> > /sys/kernel/mm/swap/vma_ra_enabled
>
> It's not a config option and is enabled by default. IOW, it's under the radar
> so current users cannot notice it. That's why we want to emit big fat warnning.
> when old user set 0 to page-cluster. However, as Andrew said, it's lame.
>
> If we make it config option, product maker/kernel upgrade user can have
> a chance to notice and read description so they could be aware of two weird
> knobs and help to solve the problem in advance without printk_once warn.
> If user has no interest about swap-readahead or skip the new config option
> by mistake, it works physcial readahead which means no regression.

Yup, a Kconfig option sounds like a good idea. And that's a bit more
friendly to tiny kernels as well.