Re: [PATCH 1/9] memcg: make the v1 soft limit knob inert

Shakeel Butt <[email protected]>
Newsgroups gmane.linux.kernel.cgroups,gmane.linux.kernel.mm,gmane.linux.kernel
Message-ID <[email protected]>
On Thu, Aug 13, 2026 at 10:22:57AM +0200, Michal Hocko wrote:
> On Tue 11-08-26 13:31:55, Shakeel Butt wrote:
> > The v1 soft limit has been deprecated since v6.12 and nobody has
> > reported depending on it. Start the removal by decoupling the interface
> > from the implementation: keep memory.soft_limit_in_bytes, but ignore
> > writes to it and always report the maximum value on read similar to
> > what memory.kmem.limit_in_bytes already does.
> > 
> > Writes are still parsed, so malformed input keeps returning -EINVAL.
> > The knob now also behaves the same everywhere: it used to return
> > -EOPNOTSUPP on PREEMPT_RT, where soft limit reclaim has always been
> > disabled.
> 
> Is there any specific reason to not return EOPNOTSUPP for everybody now?

I followed the memory.kmem.limit_in_bytes example. If you have strong opinion, I
am ok with EOPNOTSUPP as well.

> 
> > This also fixes the syzbot report linked below. Soft limit reclaim is
> > the only caller that runs shrink_lruvec() from kswapd against a
> > specific memcg, so it is the only way to reach lru_gen_shrink_lruvec()
> > and in turn set_mm_walk(), which warns when called from kswapd.
> > 
> > Reported-by: syzbot+12ee2725d5fde63a9c96-Pl5Pbv+GP7P466ipTTIvnc23WoclnBCfAL8bYrjMMd8@public.gmane.org
> > Closes: https://lore.kernel.org/all/6a7a6929.b50370da.49fe0.005e.GAE-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org/
> > Signed-off-by: Shakeel Butt <[email protected]>
> 
> Anyway
> Acked-by: Michal Hocko <mhocko-IBi9RG/[email protected]>

Thanks for reviewing the series.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.