[PATCH v8 06/14] mm: multi-gen LRU: minimal implementation

Linus Torvalds torvalds at linux-foundation.org
Tue Mar 8 16:02:29 PST 2022


On Tue, Mar 8, 2022 at 3:48 PM Yu Zhao <yuzhao at google.com> wrote:
> +
> +config TIERS_PER_GEN
> +       int "Number of tiers per generation"
> +       depends on LRU_GEN
> +       range 2 4
> +       default 4
> +       help
> +         Do not decrease this value unless you run out of spare bits in page
> +         flags, i.e., you see the "Not enough bits in page flags" build error.
> +
> +         This option uses N-2 bits in page flags.

Exact same issue as with the previous patch. Don't ask things like
this. Most *definitely* don't ask things like this if they can cause
build errors.

Just set the tiers to 4, and make sure that the number of generations
is small enough that the "Not enough bits in page flags" build error
just cannot happen.

This kind of "ask people questions they cannot sanely answer" is not acceptable.

And build errors that depend on configuration also aren't acceptable.

End result: DO NOT DO THIS.

The whole "ask user a question that you can't answer yourself" is an
actively wrong cop-out.

If you can't answer it, then the user sure as hell can't either, and
the question is pure garbage and only results in more problems and
less coherent testing.

                      Linus



More information about the linux-arm-kernel mailing list