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]
Date:   Tue, 11 Apr 2023 15:12:34 +0200
From:   Michal Hocko <mhocko@...e.com>
To:     Gang Li <ligang.bdlg@...edance.com>
Cc:     Michal Koutný <mkoutny@...e.com>,
        Waiman Long <longman@...hat.com>, cgroups@...r.kernel.org,
        linux-mm@...ck.org, rientjes@...gle.com,
        Zefan Li <lizefan.x@...edance.com>,
        linux-kernel@...r.kernel.org
Subject: Re: Re: [PATCH v4] mm: oom: introduce cpuset oom

On Tue 11-04-23 21:04:18, Gang Li wrote:
> 
> 
> On 2023/4/11 20:23, Michal Koutný wrote:
> > Hello.
> > 
> > On Tue, Apr 11, 2023 at 02:58:15PM +0800, Gang Li <ligang.bdlg@...edance.com> wrote:
> > > +	cpuset_for_each_descendant_pre(cs, pos_css, &top_cpuset) {
> > > +		if (nodes_equal(cs->mems_allowed, task_cs(current)->mems_allowed)) {
> > > +			css_task_iter_start(&(cs->css), CSS_TASK_ITER_PROCS, &it);
> > > +			while (!ret && (task = css_task_iter_next(&it)))
> > > +				ret = fn(task, arg);
> > > +			css_task_iter_end(&it);
> > > +		}
> > > +	}
> > > +	rcu_read_unlock();
> > > +	cpuset_read_unlock();
> > > +	return ret;
> > > +}
> > 
> > I see this traverses all cpusets without the hierarchy actually
> > mattering that much. Wouldn't the CONSTRAINT_CPUSET better achieved by
> > globally (or per-memcg) scanning all processes and filtering with:
> 
> Oh I see, you mean scanning all processes in all cpusets and scanning
> all processes globally are equivalent.

Why cannot you simple select a process from the cpuset the allocating
process belongs to? I thought the whole idea was to handle well
partitioned workloads.

> > 	nodes_intersect(current->mems_allowed, p->mems_allowed
> 
> Perhaps it would be better to use nodes_equal first, and if no suitable
> victim is found, then downgrade to nodes_intersect?

How can this happen?

> NUMA balancing mechanism tends to keep memory on the same NUMA node, and
> if the selected victim's memory happens to be on a node that does not
> intersect with the current process's node, we still won't be able to
> free up any memory.

AFAIR NUMA balancing doesn't touch processes with memory policies.
-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ