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

From: Michal Hocko

Date: Thu Mar 12 2026 - 03:19:07 EST


On Fri 06-03-26 17:44:08, Benjamin Lee McQueen wrote:
> 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 believe we need some real workloads that have very strong reason to
not move to PSI and need this to justify any change in this area.

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

--
Michal Hocko
SUSE Labs