From: Swapnil Sapkal <swapnil.sapkal@amd.com>
To: <mingo@redhat.com>, <peterz@infradead.org>,
<juri.lelli@redhat.com>, <vincent.guittot@linaro.org>
Cc: <dietmar.eggemann@arm.com>, <rostedt@goodmis.org>,
<bsegall@google.com>, <mgorman@suse.de>, <bristot@redhat.com>,
<vschneid@redhat.com>, <iamjoonsoo.kim@lge.com>,
<linux-kernel@vger.kernel.org>, <gautham.shenoy@amd.com>,
<kprateek.nayak@amd.com>, <wyes.karny@amd.com>,
Swapnil Sapkal <swapnil.sapkal@amd.com>
Subject: [PATCH 0/2] Cleanup and Fix for wrong accounting of migrated cache hot tasks
Date: Wed, 14 Jun 2023 10:22:22 +0000 [thread overview]
Message-ID: <20230614102224.12555-1-swapnil.sapkal@amd.com> (raw)
In /proc/schedstat, lb_hot_gained reports the number of times cache-hot
tasks were migrated as a part of load balancing. This value is incremented
in can_migrate_task() if the task is cache hot and migratable. But after
incrementing this value, it is possible that the task won't get migrated,
in which case this value will be incorrect. Fix this by incrementing it
in detach_task().
While at it, cleanup migrate_degrades_locality() by making it return
an enum instead of the {-1,0,1} to improve the readability of
can_migrate_task().
Swapnil Sapkal (2):
sched/fair: Fix value reported by hot tasks pulled in /proc/schedstat
sched/fair: Cleanup in migrate_degrades_locality() to improve
readability
kernel/sched/fair.c | 100 +++++++++++++++++++++++++++++---------------
1 file changed, 66 insertions(+), 34 deletions(-)
--
2.34.1
next reply other threads:[~2023-06-14 10:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-14 10:22 Swapnil Sapkal [this message]
2023-06-14 10:22 ` [PATCH 1/2] sched/fair: Fix value reported by hot tasks pulled in /proc/schedstat Swapnil Sapkal
2023-06-19 9:22 ` Peter Zijlstra
2023-06-21 4:38 ` Swapnil Sapkal
2023-06-14 10:22 ` [PATCH 2/2] sched/fair: Cleanup in migrate_degrades_locality() to improve readability Swapnil Sapkal
2023-06-19 9:45 ` Peter Zijlstra
2023-06-21 4:44 ` Swapnil Sapkal
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=20230614102224.12555-1-swapnil.sapkal@amd.com \
--to=swapnil.sapkal@amd.com \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=gautham.shenoy@amd.com \
--cc=iamjoonsoo.kim@lge.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=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=wyes.karny@amd.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;
as well as URLs for NNTP newsgroup(s).