mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Swapnil Sapkal <Swapnil.Sapkal@amd.com>
To: Shrikanth Hegde <sshegde@linux.ibm.com>
Cc: mingo@redhat.com, peterz@infradead.org,
	torvalds@linux-foundation.org, juri.lelli@redhat.com,
	dietmar.eggemann@arm.com, rostedt@goodmis.org, mgorman@suse.de,
	bristot@redhat.com, vschneid@redhat.com,
	vincent.guittot@linaro.org, gautham.shenoy@amd.com,
	kprateek.nayak@amd.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/1] sched: Report the different kinds of imbalances in /proc/schedstat
Date: Mon, 18 Mar 2024 10:34:22 +0530	[thread overview]
Message-ID: <de6827d2-0012-4f23-b55b-083aba84c0ff@amd.com> (raw)
In-Reply-To: <839ae17e-3818-463d-9a5c-3c1eac927ae8@linux.ibm.com>

Hello Shrikanth,

On 3/15/2024 10:26 PM, Shrikanth Hegde wrote:
>
> On 3/15/24 7:25 PM, Swapnil Sapkal wrote:
>> In /proc/schedstat, lb_imbalance reports the sum of imbalances
>> discovered in sched domains with each call to sched_balance_rq(), which is
>> not very useful because lb_imbalance does not mention whether the imbalance
>> is due to load, utilization, nr_tasks or misfit_tasks. Remove this field
>> from /proc/schedstat.
>>
>> Currently there is no field in /proc/schedstat to report different types
>> of imbalances. Introduce new fields in /proc/schedstat to report the
>> total imbalances in load, utilization, nr_tasks or misfit_tasks.
>>
>> Added fields to /proc/schedstat:
>>   	- lb_imbalance_load: Total imbalance due to load.
>> 	- lb_imbalance_util: Total imbalance due to utilization.
>> 	- lb_imbalance_task: Total imbalance due to number of tasks.
>> 	- lb_imbalance_misfit: Total imbalance due to misfit tasks.
>>
>> Signed-off-by: Swapnil Sapkal <swapnil.sapkal@amd.com>
>> ---
>>   Documentation/scheduler/sched-stats.rst | 119 ++++++++++++++----------
>>   include/linux/sched/topology.h          |   5 +-
>>   kernel/sched/fair.c                     |  21 ++++-
>>   kernel/sched/stats.c                    |   7 +-
>>   4 files changed, 98 insertions(+), 54 deletions(-)
>>
>> diff --git a/Documentation/scheduler/sched-stats.rst b/Documentation/scheduler/sched-stats.rst
>> index 7c2b16c4729d..e2a6b53a38ee 100644
>> --- a/Documentation/scheduler/sched-stats.rst
>> +++ b/Documentation/scheduler/sched-stats.rst
>> @@ -6,10 +6,15 @@ Version 16 of schedstats changed the order of definitions within
>>   'enum cpu_idle_type', which changed the order of [CPU_MAX_IDLE_TYPES]
>>   columns in show_schedstat(). In particular the position of CPU_IDLE
>>   and __CPU_NOT_IDLE changed places. The size of the array is unchanged.
> Size of the array would change after this patch. So this line can be updated.

 From this line it is not clear that whether it is referring to enum size or number of columns. I will update this in next version as enum size is unchanged.

>> +Also stop reporting 'lb_imbalance' as it has no significance anymore
>> +and instead add more relevant fields namely 'lb_imbalance_load',
>> +'lb_imbalance_util', 'lb_imbalance_task' and 'lb_imbalance_misfit'.
>>   
> Rest of the changes look good to me.
> Reviewed-by: Shrikanth Hegde <sshegde@linux.ibm.com>

--

Thanks and Regards, Swapnil


      reply	other threads:[~2024-03-18  5:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-15 13:55 [PATCH v2 0/1] Fix lb_imbalance reporting " Swapnil Sapkal
2024-03-15 13:55 ` [PATCH v2 1/1] sched: Report the different kinds of imbalances " Swapnil Sapkal
2024-03-15 16:56   ` Shrikanth Hegde
2024-03-18  5:04     ` Swapnil Sapkal [this message]

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=de6827d2-0012-4f23-b55b-083aba84c0ff@amd.com \
    --to=swapnil.sapkal@amd.com \
    --cc=bristot@redhat.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=gautham.shenoy@amd.com \
    --cc=juri.lelli@redhat.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=sshegde@linux.ibm.com \
    --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

all inboxes | Powered by JetHome®