[<prev] [next>] [day] [month] [year] [list]
Message-ID: <Y3Rd8B7oRjds4yCB@localhost.localdomain>
Date: Wed, 16 Nov 2022 11:50:08 +0800
From: Hui Su <suhui_kernel@....com>
To: Ingo Molnar <mingo@...hat.com>,
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>,
linux-kernel@...r.kernel.org
Cc: suhui@...u.com
Subject: [PATCH] sched: use nr_cpus_node() here
use nr_cpus_node() here
Signed-off-by: Hui Su <suhui_kernel@....com>
---
kernel/sched/fair.c | 2 +-
kernel/sched/topology.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index e4a0b8bd941c..94e3c9169a8f 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -1805,7 +1805,7 @@ static void update_numa_stats(struct task_numa_env *env,
}
rcu_read_unlock();
- ns->weight = cpumask_weight(cpumask_of_node(nid));
+ ns->weight = nr_cpus_node(nid);
ns->node_type = numa_classify(env->imbalance_pct, ns);
diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
index 8739c2a5a54e..4d06ec82c61b 100644
--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -1999,7 +1999,7 @@ void sched_update_numa(int cpu, bool online)
* Scheduler NUMA topology is updated when the first CPU of a
* node is onlined or the last CPU of a node is offlined.
*/
- if (cpumask_weight(cpumask_of_node(node)) != 1)
+ if (nr_cpus_node(node) != 1)
return;
sched_reset_numa();
--
2.34.1
Powered by blists - more mailing lists