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: <aAMc0ux6_jEhEskd@gourry-fedora-PF4VCD3F>
Date: Fri, 18 Apr 2025 23:47:30 -0400
From: Gregory Price <gourry@...rry.net>
To: Waiman Long <llong@...hat.com>
Cc: cgroups@...r.kernel.org, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, kernel-team@...a.com, tj@...nel.org,
	hannes@...xchg.org, mkoutny@...e.com, mhocko@...nel.org,
	roman.gushchin@...ux.dev, shakeel.butt@...ux.dev,
	muchun.song@...ux.dev, akpm@...ux-foundation.org
Subject: Re: [PATCH v2 2/2] vmscan,cgroup: apply mems_effective to reclaim

On Fri, Apr 18, 2025 at 10:06:40PM -0400, Waiman Long wrote:
> > +bool cpuset_node_allowed(struct cgroup *cgroup, int nid)
> > +{
> > +	struct cgroup_subsys_state *css;
> > +	unsigned long flags;
> > +	struct cpuset *cs;
> > +	bool allowed;
> > +
> > +	css = cgroup_get_e_css(cgroup, &cpuset_cgrp_subsys);
> > +	if (!css)
> > +		return true;
> > +
> > +	cs = container_of(css, struct cpuset, css);
> > +	spin_lock_irqsave(&callback_lock, flags);
> > +	/* At least one parent must have a valid node list */
> > +	while (nodes_empty(cs->effective_mems))
> > +		cs = parent_cs(cs);
> 
> For cgroup v2, effective_mems should always be set and walking up the tree
> isn't necessary. For v1, it can be empty, but memory cgroup and cpuset are
> unlikely in the same hierarchy.
> 

Hm, do i need different paths here for v1 vs v2 then?  Or is it
sufficient to simply return true if effective_mems is empty (which
implies v1)?

Thanks,
~Gregory

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ