Re: [PATCH -next] mm: vmstat: make refresh interval take effect immediately

From: David Hildenbrand (Arm)

Date: Thu Mar 26 2026 - 06:28:29 EST


On 3/26/26 08:55, Yang Yingliang wrote:
> The refresh workqueue is re-queued after last timer is triggered, so when
> the refresh interval is set, it doesn't take effect immediately.
>
> It leads a problem like this: if current interval is 8640000s (100 days),
> and we want changing it to 1s, the new interval can't take effect until
> 100 days later.

Well, yes. But, the default is set to HZ. If you set the default to
100days you are probably doing something very wrong in the first place?

What's the use case that warrants the complexity? Even when set to, say,
30s, waiting 30s is not that bad.

Would we maybe just want to set an upper limit to which we clamp? That
would be a lot simpler.

--
Cheers,

David