[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210305135241.ftnxhktb6ix5qkk5@e107158-lin.cambridge.arm.com>
Date: Fri, 5 Mar 2021 13:52:41 +0000
From: Qais Yousef <qais.yousef@....com>
To: Vincent Guittot <vincent.guittot@...aro.org>
Cc: mingo@...hat.com, peterz@...radead.org, juri.lelli@...hat.com,
dietmar.eggemann@....com, rostedt@...dmis.org, bsegall@...gle.com,
mgorman@...e.de, bristot@...hat.com, linux-kernel@...r.kernel.org,
joel@...lfernandes.org, valentin.schneider@....com,
fweisbec@...il.com, tglx@...utronix.de
Subject: Re: [PATCH 6/7 v4] sched/fair: trigger the update of blocked load on
newly idle cpu
On 02/24/21 14:30, Vincent Guittot wrote:
> +/*
> + * Check if we need to run the ILB for updating blocked load before entering
> + * idle state.
> + */
> +void nohz_run_idle_balance(int cpu)
> +{
> + unsigned int flags;
> +
> + flags = atomic_fetch_andnot(NOHZ_NEWILB_KICK, nohz_flags(cpu));
> +
> + /*
> + * Update the blocked load only if no SCHED_SOFTIRQ is about to happen
> + * (ie NOHZ_STATS_KICK set) and will do the same.
> + */
> + if ((flags == NOHZ_NEWILB_KICK) && !need_resched())
> + _nohz_idle_balance(cpu_rq(cpu), NOHZ_STATS_KICK, CPU_IDLE);
> +}
nit: need_resched() implies this_cpu, but the function signature implies you
could operate on any CPU. Do need_resched() outside this function or make
the function read smp_processor_id() itself without taking an arg?
Thanks
--
Qais Yousef
Powered by blists - more mailing lists