[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240530122401.3826022-3-zegao@tencent.com>
Date: Thu, 30 May 2024 08:24:01 -0400
From: Ze Gao <zegao2021@...il.com>
To: Frederic Weisbecker <frederic@...nel.org>,
Joel Fernandes <joel@...lfernandes.org>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...e.hu>
Cc: Cruz Zhao <CruzZhao@...ux.alibaba.com>,
linux-kernel@...r.kernel.org,
Ze Gao <zegao@...cent.com>
Subject: [RFC PATCH 2/2] sched/core: Remove sched_core_idle_cpu()
Since there is no user of sched_core_idle_cpu(), delete it.
Signed-off-by: Ze Gao <zegao@...cent.com>
---
include/linux/sched.h | 2 --
kernel/sched/core.c | 13 -------------
2 files changed, 15 deletions(-)
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 61591ac6eab6..85ef086362c9 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2182,11 +2182,9 @@ extern void sched_core_free(struct task_struct *tsk);
extern void sched_core_fork(struct task_struct *p);
extern int sched_core_share_pid(unsigned int cmd, pid_t pid, enum pid_type type,
unsigned long uaddr);
-extern int sched_core_idle_cpu(int cpu);
#else
static inline void sched_core_free(struct task_struct *tsk) { }
static inline void sched_core_fork(struct task_struct *p) { }
-static inline int sched_core_idle_cpu(int cpu) { return idle_cpu(cpu); }
#endif
extern void sched_set_stop_task(int cpu, struct task_struct *stop);
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index bcf2c4cc0522..c42fe87e07d0 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -7453,19 +7453,6 @@ struct task_struct *idle_task(int cpu)
return cpu_rq(cpu)->idle;
}
-#ifdef CONFIG_SCHED_CORE
-int sched_core_idle_cpu(int cpu)
-{
- struct rq *rq = cpu_rq(cpu);
-
- if (sched_core_enabled(rq) && rq->curr == rq->idle)
- return 1;
-
- return idle_cpu(cpu);
-}
-
-#endif
-
#ifdef CONFIG_SMP
/*
* This function computes an effective utilization for the given CPU, to be
--
2.41.0
Powered by blists - more mailing lists