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: <Z8q1ZdJEjOEkhEt2@jlelli-thinkpadt14gen4.remote.csb>
Date: Fri, 7 Mar 2025 08:59:17 +0000
From: Juri Lelli <juri.lelli@...hat.com>
To: Shrikanth Hegde <sshegde@...ux.ibm.com>
Cc: linux-kernel@...r.kernel.org, cgroups@...r.kernel.org,
	Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Vincent Guittot <vincent.guittot@...aro.org>,
	Dietmar Eggemann <dietmar.eggemann@....com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
	Valentin Schneider <vschneid@...hat.com>,
	Waiman Long <longman@...hat.com>, Tejun Heo <tj@...nel.org>,
	Johannes Weiner <hannes@...xchg.org>,
	Michal Koutný <mkoutny@...e.com>,
	Qais Yousef <qyousef@...alina.io>,
	Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
	Swapnil Sapkal <swapnil.sapkal@....com>,
	Phil Auld <pauld@...hat.com>, luca.abeni@...tannapisa.it,
	tommaso.cucinotta@...tannapisa.it,
	Jon Hunter <jonathanh@...dia.com>
Subject: Re: [PATCH v2 4/8] sched/deadline: Rebuild root domain accounting
 after every update

On 07/03/25 13:02, Shrikanth Hegde wrote:
> 
> 
> On 3/6/25 19:40, Juri Lelli wrote:
> > Rebuilding of root domains accounting information (total_bw) is
> > currently broken on some cases, e.g. suspend/resume on aarch64. Problem
> > is that the way we keep track of domain changes and try to add bandwidth
> > back is convoluted and fragile.
> > 
> > Fix it by simplify things by making sure bandwidth accounting is cleared
> > and completely restored after root domains changes (after root domains
> > are again stable).
> > 
> > Reported-by: Jon Hunter <jonathanh@...dia.com>
> > Fixes: 53916d5fd3c0 ("sched/deadline: Check bandwidth overflow earlier for hotplug")
> > Signed-off-by: Juri Lelli <juri.lelli@...hat.com>

...

> > @@ -965,11 +967,12 @@ static void dl_rebuild_rd_accounting(void)
> >   	rcu_read_lock();
> > -	/*
> > -	 * Clear default root domain DL accounting, it will be computed again
> > -	 * if a task belongs to it.
> > -	 */
> > -	dl_clear_root_domain(&def_root_domain);
> > +	for_each_possible_cpu(cpu) {
> > +		if (dl_bw_visited(cpu, cookie))
> > +			continue;
> > +
> > +		dl_clear_root_domain_cpu(cpu);
> > +	}
> 
> This will clear all possible root domains bandwidth and rebuild it.
> 
> For an online CPUs, the fair server bandwidth is added i think in
> rq_attach_root. But for an offline CPUs the sched domains wont be rebuilt.
> It may not be an issue. but the def_root_domain's bw may be different
> afterwords. no?

dl_clear_root_domain() actually adds DL servers contribution back on
their domains (dynamic and def) and we want to keep offline CPUs DL
server contribution not accounted for until they come back online and
the domains are rebuilt.

Thanks,
Juri


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ