lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <15fa87f0-3c29-485e-8a0e-db0eb2343f2c@linux.ibm.com>
Date: Thu, 4 Dec 2025 11:23:14 +0530
From: Shrikanth Hegde <sshegde@...ux.ibm.com>
To: Ingo Molnar <mingo@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>, Juri Lelli
 <juri.lelli@...hat.com>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Valentin Schneider <vschneid@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Mel Gorman
 <mgorman@...e.de>, Steven Rostedt <rostedt@...dmis.org>,
        Thomas Gleixner <tglx@...utronix.de>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/6] sched/fair: Join two #ifdef CONFIG_CFS_BANDWIDTH
 blocks



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@...nel.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@...ux.ibm.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ