[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ad2af462-8984-f83a-c9df-d8bf66fbee89@bytedance.com>
Date: Thu, 15 Sep 2022 11:11:05 +0800
From: Abel Wu <wuyun.abel@...edance.com>
To: Tim Chen <tim.c.chen@...ux.intel.com>,
Peter Zijlstra <peterz@...radead.org>,
Mel Gorman <mgorman@...e.de>,
Vincent Guittot <vincent.guittot@...aro.org>
Cc: Josh Don <joshdon@...gle.com>, Chen Yu <yu.c.chen@...el.com>,
K Prateek Nayak <kprateek.nayak@....com>,
"Gautham R . Shenoy" <gautham.shenoy@....com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 4/5] sched/fair: Skip SIS domain scan if fully busy
On 9/15/22 8:22 AM, Tim Chen wrote:
> On Fri, 2022-09-09 at 13:53 +0800, Abel Wu wrote:
>> If a full domain scan failed, then no unoccupied cpus available
>> and the LLC is fully busy. In this case we'd better use cpus
>> more wisely, rather than wasting it trying to find an idle cpu
>> that probably not exist. The fully busy status will be cleared
>> when any cpu of that LLC goes idle and everything goes back to
>> normal again.
>>
>> Make the has_idle_cores boolean hint more rich by turning it
>> into a state machine.
>>
>> Signed-off-by: Abel Wu <wuyun.abel@...edance.com>
>> ---
>> include/linux/sched/topology.h | 35 +++++++++++++++++-
>> kernel/sched/fair.c | 67 ++++++++++++++++++++++++++++------
>> 2 files changed, 89 insertions(+), 13 deletions(-)
>>
>> diff --git a/include/linux/sched/topology.h b/include/linux/sched/topology.h
>> index 816df6cc444e..cc6089765b64 100644
>> --- a/include/linux/sched/topology.h
>> +++ b/include/linux/sched/topology.h
>> @@ -77,10 +77,43 @@ extern int sched_domain_level_max;
>>
>> struct sched_group;
>>
>> +/*
>> + * States of the sched-domain
>> + *
>> + * - sd_has_icores
>> + * This state is only used in LLC domains to indicate worthy
>> + * of a full scan in SIS due to idle cores available.
>> + *
>> + * - sd_has_icpus
>> + * This state indicates that unoccupied (sched-idle/idle) cpus
>> + * might exist in this domain. For the LLC domains it is the
>> + * default state since these cpus are the main targets of SIS
>> + * search, and is also used as a fallback state of the other
>> + * states.
>> + *
>> + * - sd_is_busy
>> + * This state indicates there are no unoccupied cpus in this
>
> Suggest reword to
>
> .. indicates that all cpus are occupied in this ...
OK, I will make a update in next version!
Thanks,
Abel
Powered by blists - more mailing lists