]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
sched/fair: Make cfs_rq->throttled_csd_list available on !SMP
authorJosh Don <joshdon@google.com>
Fri, 22 Sep 2023 23:05:34 +0000 (16:05 -0700)
committerIngo Molnar <mingo@kernel.org>
Sun, 24 Sep 2023 10:08:28 +0000 (12:08 +0200)
This makes the following patch cleaner by avoiding extra CONFIG_SMP
conditionals on the availability of rq->throttled_csd_list.

Signed-off-by: Josh Don <joshdon@google.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20230922230535.296350-1-joshdon@google.com
kernel/sched/fair.c
kernel/sched/sched.h

index 75720008fdd21196d37d21d3cbfbac100af536da..41c960eca7920ebbd028ba59b9eafda77397686a 100644 (file)
@@ -5763,11 +5763,9 @@ static bool distribute_cfs_runtime(struct cfs_bandwidth *cfs_b)
                if (!cfs_rq_throttled(cfs_rq))
                        goto next;
 
-#ifdef CONFIG_SMP
                /* Already queued for async unthrottle */
                if (!list_empty(&cfs_rq->throttled_csd_list))
                        goto next;
-#endif
 
                /* By the above checks, this should never be true */
                SCHED_WARN_ON(cfs_rq->runtime_remaining > 0);
@@ -6134,9 +6132,7 @@ static void init_cfs_rq_runtime(struct cfs_rq *cfs_rq)
 {
        cfs_rq->runtime_enabled = 0;
        INIT_LIST_HEAD(&cfs_rq->throttled_list);
-#ifdef CONFIG_SMP
        INIT_LIST_HEAD(&cfs_rq->throttled_csd_list);
-#endif
 }
 
 void start_cfs_bandwidth(struct cfs_bandwidth *cfs_b)
index 9260120ed2a5caeefbcf487a1ef7fe51d45c296c..96f8ab7a070219a2c7ac7f7fa8054ee88c70bd6c 100644 (file)
@@ -634,9 +634,7 @@ struct cfs_rq {
        int                     throttled;
        int                     throttle_count;
        struct list_head        throttled_list;
-#ifdef CONFIG_SMP
        struct list_head        throttled_csd_list;
-#endif
 #endif /* CONFIG_CFS_BANDWIDTH */
 #endif /* CONFIG_FAIR_GROUP_SCHED */
 };