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: Wed,  3 Apr 2024 17:05:35 +0200
From: Pierre Gondois <pierre.gondois@....com>
To: linux-kernel@...r.kernel.org
Cc: Aaron Lu <aaron.lu@...el.com>,
	Rui Zhang <rui.zhang@...el.com>,
	Pierre Gondois <pierre.gondois@....com>,
	Anna-Maria Behnsen <anna-maria@...utronix.de>,
	Frederic Weisbecker <frederic@...nel.org>,
	Ingo Molnar <mingo@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Peter Zijlstra <peterz@...radead.org>,
	Juri Lelli <juri.lelli@...hat.com>,
	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>,
	Daniel Bristot de Oliveira <bristot@...hat.com>,
	Valentin Schneider <vschneid@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Michal Hocko <mhocko@...e.com>,
	Waiman Long <longman@...hat.com>
Subject: [PATCH 3/7] sched/isolation: Use HKR_TYPE_SCHED in find_new_ilb()

Replace the HK_TYPE_MISC isolation mask with HKR_TYPE_SCHED in
find_new_ilb(). This ultimately resolves [1], i.e. selecting
a CPU for the nohz idle balance which cannot pull tasks
through:
sched_balance_trigger()
\-nohz_balancer_kick()
  \-kick_ilb()
    \-find_new_ilb()
      \-smp_call_function_single_async()
        \-nohz_csd_cpu()
          \-raise_softirq_irqoff()
sched_balance_softirq()
\-_nohz_idle_balance()
  \-sched_balance_domains()

Indeed, a following patch will add/remove CPUs with a NULL sched
domain to the HKR_TYPE_SCHED cpumask.

[1] https://lore.kernel.org/all/20230804090858.7605-1-rui.zhang@intel.com/

Reported-by: Zhang Rui <rui.zhang@...el.com>
Signed-off-by: Pierre Gondois <pierre.gondois@....com>
---
 kernel/sched/fair.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index e3d707243ca7..0665f5eb4703 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -11842,16 +11842,13 @@ static inline int on_null_domain(struct rq *rq)
  * - When one of the busy CPUs notices that there may be an idle rebalancing
  *   needed, they will kick the idle load balancer, which then does idle
  *   load balancing for all the idle CPUs.
- *
- * - HK_TYPE_MISC CPUs are used for this task, because HK_TYPE_SCHED is not set
- *   anywhere yet.
  */
 static inline int find_new_ilb(void)
 {
 	const struct cpumask *hk_mask;
 	int ilb_cpu;
 
-	hk_mask = housekeeping_cpumask(HK_TYPE_MISC);
+	hk_mask = housekeeping_runtime_cpumask(HKR_TYPE_SCHED);
 
 	for_each_cpu_and(ilb_cpu, nohz.idle_cpus_mask, hk_mask) {
 
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ