[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1650820094-27165-1-git-send-email-CruzZhao@linux.alibaba.com>
Date: Mon, 25 Apr 2022 01:08:14 +0800
From: Cruz Zhao <CruzZhao@...ux.alibaba.com>
To: mingo@...hat.com, peterz@...radead.org, juri.lelli@...hat.com,
vincent.guittot@...aro.org, dietmar.eggemann@....com,
rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de,
bristot@...hat.com
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] sched/core: Optimize sched_core_next()
As there is __node_2_sc() defined before, just use it instead of
container_of() in function sched_core_next().
Signed-off-by: Cruz Zhao <CruzZhao@...ux.alibaba.com>
---
kernel/sched/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index d50d4dd..d3e3d6e 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -284,7 +284,7 @@ static struct task_struct *sched_core_next(struct task_struct *p, unsigned long
if (!node)
return NULL;
- p = container_of(node, struct task_struct, core_node);
+ p = __node_2_sc(node);
if (p->core_cookie != cookie)
return NULL;
--
1.8.3.1
Powered by blists - more mailing lists