]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
sched/core: Remove HK_TYPE_SCHED
authorWaiman Long <longman@redhat.com>
Wed, 30 Oct 2024 17:52:50 +0000 (13:52 -0400)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 2 Dec 2024 11:24:27 +0000 (12:24 +0100)
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 <longman@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Frederic Weisbecker <frederic@kernel.org>
Link: https://lore.kernel.org/r/20241030175253.125248-2-longman@redhat.com
include/linux/sched/isolation.h
kernel/sched/fair.c
kernel/sched/isolation.c

index 2b461129d1fad0fd0ef1ad759fe44695dc635e8c..499d5e480882894407631a0a10c02ca630930306 100644 (file)
@@ -10,7 +10,6 @@ enum hk_type {
        HK_TYPE_TIMER,
        HK_TYPE_RCU,
        HK_TYPE_MISC,
-       HK_TYPE_SCHED,
        HK_TYPE_TICK,
        HK_TYPE_DOMAIN,
        HK_TYPE_WQ,
index 4283c818bbd19c618dd06425cd990c13f59bee2d..ef302263f5b3d22c520aec20770622d2432d734f 100644 (file)
@@ -12197,9 +12197,6 @@ 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)
 {
@@ -12444,10 +12441,6 @@ void nohz_balance_enter_idle(int cpu)
        if (!cpu_active(cpu))
                return;
 
-       /* Spare idle load balancing on CPUs that don't want to be disturbed: */
-       if (!housekeeping_cpu(cpu, HK_TYPE_SCHED))
-               return;
-
        /*
         * Can be set safely without rq->lock held
         * If a clear happens, it will have evaluated last additions because
@@ -12667,13 +12660,6 @@ static void nohz_newidle_balance(struct rq *this_rq)
 {
        int this_cpu = this_rq->cpu;
 
-       /*
-        * This CPU doesn't want to be disturbed by scheduler
-        * housekeeping
-        */
-       if (!housekeeping_cpu(this_cpu, HK_TYPE_SCHED))
-               return;
-
        /* Will wake up very soon. No time for doing anything else*/
        if (this_rq->avg_idle < sysctl_sched_migration_cost)
                return;
index 5891e715f00d028b0d2f4fd157e99f319b899a1d..5345e11f3d44f74362095c55839cf63de9ff4083 100644 (file)
@@ -12,7 +12,6 @@ enum hk_flags {
        HK_FLAG_TIMER           = BIT(HK_TYPE_TIMER),
        HK_FLAG_RCU             = BIT(HK_TYPE_RCU),
        HK_FLAG_MISC            = BIT(HK_TYPE_MISC),
-       HK_FLAG_SCHED           = BIT(HK_TYPE_SCHED),
        HK_FLAG_TICK            = BIT(HK_TYPE_TICK),
        HK_FLAG_DOMAIN          = BIT(HK_TYPE_DOMAIN),
        HK_FLAG_WQ              = BIT(HK_TYPE_WQ),