From: Shrikanth Hegde <sshegde@linux.ibm.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Valentin Schneider <vschneid@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Mel Gorman <mgorman@suse.de>,
Steven Rostedt <rostedt@goodmis.org>,
Thomas Gleixner <tglx@linutronix.de>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/6] sched/fair: Join two #ifdef CONFIG_CFS_BANDWIDTH blocks
Date: Thu, 4 Dec 2025 11:23:14 +0530 [thread overview]
Message-ID: <15fa87f0-3c29-485e-8a0e-db0eb2343f2c@linux.ibm.com> (raw)
In-Reply-To: <20251201064647.1851919-2-mingo@kernel.org>
On 12/1/25 12:16 PM, Ingo Molnar wrote:
> Join two identical #ifdef blocks:
>
> #ifdef CONFIG_CFS_BANDWIDTH
> ...
> #endif
>
> #ifdef CONFIG_CFS_BANDWIDTH
> ...
> #endif
>
nit: I think it is CONFIG_FAIR_GROUP_SCHED here and in the subject line.
> Also mark nested #ifdef blocks in the usual fashion, to make
> it more apparent where in a nested hierarchy of #ifdefs we
> are at a glance.
>
> Signed-off-by: Ingo Molnar <mingo@kernel.org>
> ---
> kernel/sched/sched.h | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
> index b419a4d98461..a29965c93832 100644
> --- a/kernel/sched/sched.h
> +++ b/kernel/sched/sched.h
> @@ -726,9 +726,7 @@ struct cfs_rq {
> unsigned long h_load;
> u64 last_h_load_update;
> struct sched_entity *h_load_next;
> -#endif /* CONFIG_FAIR_GROUP_SCHED */
>
> -#ifdef CONFIG_FAIR_GROUP_SCHED
> struct rq *rq; /* CPU runqueue to which this cfs_rq is attached */
>
> /*
> @@ -746,14 +744,14 @@ struct cfs_rq {
> /* Locally cached copy of our task_group's idle value */
> int idle;
>
> -#ifdef CONFIG_CFS_BANDWIDTH
> +# ifdef CONFIG_CFS_BANDWIDTH
> int runtime_enabled;
> s64 runtime_remaining;
>
> u64 throttled_pelt_idle;
> -#ifndef CONFIG_64BIT
> +# ifndef CONFIG_64BIT
> u64 throttled_pelt_idle_copy;
> -#endif
> +# endif
> u64 throttled_clock;
> u64 throttled_clock_pelt;
> u64 throttled_clock_pelt_time;
> @@ -765,7 +763,7 @@ struct cfs_rq {
> struct list_head throttled_list;
> struct list_head throttled_csd_list;
> struct list_head throttled_limbo_list;
> -#endif /* CONFIG_CFS_BANDWIDTH */
> +# endif /* CONFIG_CFS_BANDWIDTH */
> #endif /* CONFIG_FAIR_GROUP_SCHED */
> };
>
Other than above nit,
Reviewed-by: Shrikanth Hegde <sshegde@linux.ibm.com>
next prev parent reply other threads:[~2025-12-04 5:53 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-01 6:46 [PATCH 0/6] sched: Misc cleanups Ingo Molnar
2025-12-01 6:46 ` [PATCH 1/6] sched/fair: Join two #ifdef CONFIG_CFS_BANDWIDTH blocks Ingo Molnar
2025-12-04 5:53 ` Shrikanth Hegde [this message]
2025-12-06 10:48 ` Ingo Molnar
2025-12-14 7:46 ` [tip: sched/core] sched/fair: Join two #ifdef CONFIG_FAIR_GROUP_SCHED blocks tip-bot2 for Ingo Molnar
2025-12-15 7:59 ` tip-bot2 for Ingo Molnar
2025-12-01 6:46 ` [PATCH 2/6] sched/fair: Clean up comments in 'struct cfs_rq' Ingo Molnar
2025-12-14 7:46 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-12-15 7:59 ` tip-bot2 for Ingo Molnar
2025-12-01 6:46 ` [PATCH 3/6] sched/fair: Separate se->vlag from se->vprot Ingo Molnar
2025-12-01 8:06 ` [PATCH 3/6 v2] " Ingo Molnar
2025-12-14 7:46 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-12-15 7:59 ` tip-bot2 for Ingo Molnar
2025-12-01 6:46 ` [PATCH 4/6] sched/fair: Rename avg_vruntime() to cfs_avg_vruntime() Ingo Molnar
2025-12-02 10:24 ` Peter Zijlstra
2025-12-02 15:15 ` Ingo Molnar
2025-12-01 6:46 ` [PATCH 5/6] sched/fair: Rename cfs_rq::avg_load to cfs_rq::sum_weight Ingo Molnar
2025-12-02 10:27 ` Peter Zijlstra
2025-12-02 15:57 ` Ingo Molnar
2025-12-14 7:46 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-12-15 7:59 ` tip-bot2 for Ingo Molnar
2025-12-01 6:46 ` [PATCH 6/6] sched/fair: Rename cfs_rq::avg_vruntime to ::sum_w_vruntime, and helper functions Ingo Molnar
2025-12-02 10:35 ` Peter Zijlstra
2025-12-02 15:19 ` Ingo Molnar
2025-12-14 7:46 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-12-15 7:59 ` tip-bot2 for Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15fa87f0-3c29-485e-8a0e-db0eb2343f2c@linux.ibm.com \
--to=sshegde@linux.ibm.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome