From: vincent.donnefort@arm.com
To: peterz@infradead.org, mingo@redhat.com, vincent.guittot@linaro.org
Cc: dietmar.eggemann@arm.com, linux-kernel@vger.kernel.org,
qperret@google.com, patrick.bellasi@matbug.net,
valentin.schneider@arm.com,
Vincent Donnefort <vincent.donnefort@arm.com>
Subject: [PATCH v2 2/2] sched/fair: use lsub_positive in cpu_util_next()
Date: Thu, 25 Feb 2021 08:36:12 +0000 [thread overview]
Message-ID: <20210225083612.1113823-3-vincent.donnefort@arm.com> (raw)
In-Reply-To: <20210225083612.1113823-1-vincent.donnefort@arm.com>
From: Vincent Donnefort <vincent.donnefort@arm.com>
The sub_positive local version is saving an explicit load-store and is
enough for the cpu_util_next() usage.
Signed-off-by: Vincent Donnefort <vincent.donnefort@arm.com>
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 146ac9fec4b6..1364f8b95214 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -6525,7 +6525,7 @@ static unsigned long cpu_util_next(int cpu, struct task_struct *p, int dst_cpu)
* util_avg should already be correct.
*/
if (task_cpu(p) == cpu && dst_cpu != cpu)
- sub_positive(&util, task_util(p));
+ lsub_positive(&util, task_util(p));
else if (task_cpu(p) != cpu && dst_cpu == cpu)
util += task_util(p);
--
2.25.1
next prev parent reply other threads:[~2021-02-25 8:38 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-25 8:36 [PATCH v2 0/2] Fix task utilization accountability for EAS vincent.donnefort
2021-02-25 8:36 ` [PATCH v2 1/2] sched/fair: Fix task utilization accountability in compute_energy() vincent.donnefort
2021-02-25 8:52 ` Quentin Perret
2021-02-25 11:45 ` Dietmar Eggemann
2021-02-25 11:58 ` Quentin Perret
2021-02-25 16:23 ` Vincent Donnefort
2021-03-02 9:01 ` [tip: sched/core] " tip-bot2 for Vincent Donnefort
2021-03-03 9:49 ` tip-bot2 for Vincent Donnefort
2021-03-06 11:42 ` tip-bot2 for Vincent Donnefort
2021-02-25 8:36 ` vincent.donnefort [this message]
2021-02-25 8:53 ` [PATCH v2 2/2] sched/fair: use lsub_positive in cpu_util_next() Quentin Perret
2021-02-25 11:46 ` Dietmar Eggemann
2021-03-02 9:01 ` [tip: sched/core] " tip-bot2 for Vincent Donnefort
2021-03-03 9:49 ` tip-bot2 for Vincent Donnefort
2021-03-06 11:42 ` tip-bot2 for Vincent Donnefort
2021-02-25 17:29 ` [PATCH v2 0/2] Fix task utilization accountability for EAS Peter Zijlstra
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=20210225083612.1113823-3-vincent.donnefort@arm.com \
--to=vincent.donnefort@arm.com \
--cc=dietmar.eggemann@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=patrick.bellasi@matbug.net \
--cc=peterz@infradead.org \
--cc=qperret@google.com \
--cc=valentin.schneider@arm.com \
--cc=vincent.guittot@linaro.org \
/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).