Re: [RFC PATCH v3] mm/vmpressure: scale window size based on machine memory

From: Benjamin Lee McQueen

Date: Fri Mar 06 2026 - 11:44:28 EST


On 2026-03-06 16:52, Michal Hocko wrote:
> On Wed 04-03-26 22:30:38, Benjamin Lee McQueen wrote:
>> the vmpressure window size has been fixed at 512 pages
>> (SWAP_CLUSTER_MAX * 16), ever since the file's inception. a TODO in
>> the file notes that the vmpressure window size should be scaled
>> similarly to vmstat's scaling, via machine size.
>>
>> the problem with fixed window size on large memory systems:
>
> Thank you for this much more detail insight into your thinking. This is
> a good start. I am still missing an overall motivation though. Are you
> trying to address a theoretical concern (the said TODO) or do you have
> any practical workload that generates bogus vmpressure events.

yes, as i don't personally have a workload that explicitly requires
vmpresssure to not generate bogus events, it is still technically a "bug"
that can still be improved. i believe many legacy systems would benefit
from this as they still use vmpressure notifications.

i agree PSI is the preferred interface, but vmpressure is still used in
other production environments, like Android's LMKD, right?

-ben