Re: [PATCH v7 10/12] mm: multigenerational LRU: thrashing prevention

From: Yu Zhao
Date: Tue Feb 08 2022 - 03:43:45 EST


On Tue, Feb 08, 2022 at 01:19:00AM -0700, Yu Zhao wrote:
> Add /sys/kernel/mm/lru_gen/min_ttl_ms for thrashing prevention, as
> requested by many desktop users [1].
>
> When set to value N, it prevents the working set of N milliseconds
> from getting evicted. The OOM killer is triggered if this working set
> can't be kept in memory. Based on the average human detectable lag
> (~100ms), N=1000 usually eliminates intolerable lags due to thrashing.
> Larger values like N=3000 make lags less noticeable at the risk of
> premature OOM kills.

Refactored min_ttl into a separate patch as requested here:
https://lore.kernel.org/linux-mm/YdxSUuDc3OC4pe+f@xxxxxxxxxxxxxx/

<snipped>