lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <q2x4drxpjbxcxgns6bjp446ynsxgl32ckcljqcol7posds4nit@3n3tjq35anvb>
Date: Wed, 19 Mar 2025 12:31:27 -0700
From: Shakeel Butt <shakeel.butt@...ux.dev>
To: Jingxiang Zeng <linuszeng@...cent.com>
Cc: akpm@...ux-foundation.org, linux-mm@...ck.org, cgroups@...r.kernel.org, 
	linux-kernel@...r.kernel.org, hannes@...xchg.org, mhocko@...nel.org, roman.gushchin@...ux.dev, 
	muchun.song@...ux.dev, kasong@...cent.com
Subject: Re: [RFC 1/5] Kconfig: add SWAP_CHARGE_V1_MODE config

On Wed, Mar 19, 2025 at 12:29:11PM -0700, Shakeel Butt wrote:
> On Wed, Mar 19, 2025 at 02:41:44PM +0800, Jingxiang Zeng wrote:
> > From: Zeng Jingxiang <linuszeng@...cent.com>
> > 
> > Added SWAP_CHARGE_V1_MODE config, which is disabled by default.
> > When enabled in cgroupv2 mode, the memory accounting method of
> > swap will be restored to cgroupv1 mode.
> > 
> > Signed-off-by: Zeng Jingxiang <linuszeng@...cent.com>
> > ---
> >  include/linux/memcontrol.h |  6 ++++++
> >  init/Kconfig               | 16 ++++++++++++++++
> >  2 files changed, 22 insertions(+)
> > 
> > diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
> > index 53364526d877..dcb087ee6e8d 100644
> > --- a/include/linux/memcontrol.h
> > +++ b/include/linux/memcontrol.h
> > @@ -62,6 +62,12 @@ struct mem_cgroup_reclaim_cookie {
> >  
> >  #ifdef CONFIG_MEMCG
> >  
> > +/* Whether enable memory+swap account in cgroupv2 */
> > +static inline bool do_memsw_account_on_dfl(void)
> > +{
> > +	return IS_ENABLED(CONFIG_MEMSW_ACCOUNT_ON_DFL);
> > +}
> > +
> 
> Please move the above to memcontrol-v1.h file.
> 

And under CONFIG_MEMCG_V1 similar to do_memsw_account().

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ