[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240201011346.GE18560@ranerica-svr.sc.intel.com>
Date: Wed, 31 Jan 2024 17:13:46 -0800
From: Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>
To: alexs@...nel.org
Cc: Ingo Molnar <mingo@...hat.com>, Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
Valentin Schneider <vschneid@...hat.com>,
linux-kernel@...r.kernel.org, sshegde@...ux.ibm.com
Subject: Re: [PATCH v2 3/6] sched/fair: cleanup sched_use_asym_prio
On Tue, Jan 30, 2024 at 09:17:05PM +0800, alexs@...nel.org wrote:
> From: Alex Shi <alexs@...nel.org>
>
> And simplify the one line code. No function change.
>
> Signed-off-by: Alex Shi <alexs@...nel.org>
> To: Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>
> To: Valentin Schneider <vschneid@...hat.com>
> To: Vincent Guittot <vincent.guittot@...aro.org>
> To: Peter Zijlstra <peterz@...radead.org>
> To: Ingo Molnar <mingo@...hat.com>
> ---
> kernel/sched/fair.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 8d70417f5125..ebd659af2d78 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -9741,10 +9741,8 @@ group_type group_classify(unsigned int imbalance_pct,
> */
> static bool sched_use_asym_prio(struct sched_domain *sd, int cpu)
> {
> - if (!sched_smt_active())
> - return true;
> -
> - return sd->flags & SD_SHARE_CPUCAPACITY || is_core_idle(cpu);
> + return (!sched_smt_active()) ||
> + (sd->flags & SD_SHARE_CPUCAPACITY) || is_core_idle(cpu);
I think that compressing the two conditions into one hurts readability.
As implemented, it is clear that no further checks are required if there
is no SMT.
Also, please see my comment in patch 6/6.
Powered by blists - more mailing lists