Skip to content

Commit ae5c677

Browse files
Waiman-LongPeter Zijlstra
authored andcommitted
sched/core: Remove HK_TYPE_SCHED
The HK_TYPE_SCHED housekeeping type is defined but not set anywhere. So any code that try to use HK_TYPE_SCHED are essentially dead code. So remove HK_TYPE_SCHED and any code that use it. Signed-off-by: Waiman Long <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Acked-by: Frederic Weisbecker <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent a76328d commit ae5c677

File tree

3 files changed

+0
-16
lines changed

3 files changed

+0
-16
lines changed

include/linux/sched/isolation.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ enum hk_type {
1010
HK_TYPE_TIMER,
1111
HK_TYPE_RCU,
1212
HK_TYPE_MISC,
13-
HK_TYPE_SCHED,
1413
HK_TYPE_TICK,
1514
HK_TYPE_DOMAIN,
1615
HK_TYPE_WQ,

kernel/sched/fair.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12197,9 +12197,6 @@ static inline int on_null_domain(struct rq *rq)
1219712197
* - When one of the busy CPUs notices that there may be an idle rebalancing
1219812198
* needed, they will kick the idle load balancer, which then does idle
1219912199
* load balancing for all the idle CPUs.
12200-
*
12201-
* - HK_TYPE_MISC CPUs are used for this task, because HK_TYPE_SCHED is not set
12202-
* anywhere yet.
1220312200
*/
1220412201
static inline int find_new_ilb(void)
1220512202
{
@@ -12444,10 +12441,6 @@ void nohz_balance_enter_idle(int cpu)
1244412441
if (!cpu_active(cpu))
1244512442
return;
1244612443

12447-
/* Spare idle load balancing on CPUs that don't want to be disturbed: */
12448-
if (!housekeeping_cpu(cpu, HK_TYPE_SCHED))
12449-
return;
12450-
1245112444
/*
1245212445
* Can be set safely without rq->lock held
1245312446
* If a clear happens, it will have evaluated last additions because
@@ -12667,13 +12660,6 @@ static void nohz_newidle_balance(struct rq *this_rq)
1266712660
{
1266812661
int this_cpu = this_rq->cpu;
1266912662

12670-
/*
12671-
* This CPU doesn't want to be disturbed by scheduler
12672-
* housekeeping
12673-
*/
12674-
if (!housekeeping_cpu(this_cpu, HK_TYPE_SCHED))
12675-
return;
12676-
1267712663
/* Will wake up very soon. No time for doing anything else*/
1267812664
if (this_rq->avg_idle < sysctl_sched_migration_cost)
1267912665
return;

kernel/sched/isolation.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ enum hk_flags {
1212
HK_FLAG_TIMER = BIT(HK_TYPE_TIMER),
1313
HK_FLAG_RCU = BIT(HK_TYPE_RCU),
1414
HK_FLAG_MISC = BIT(HK_TYPE_MISC),
15-
HK_FLAG_SCHED = BIT(HK_TYPE_SCHED),
1615
HK_FLAG_TICK = BIT(HK_TYPE_TICK),
1716
HK_FLAG_DOMAIN = BIT(HK_TYPE_DOMAIN),
1817
HK_FLAG_WQ = BIT(HK_TYPE_WQ),

0 commit comments

Comments
 (0)