From: tip-bot for Andrea Parri <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: andrea.parri@amarulasolutions.com, peterz@infradead.org,
torvalds@linux-foundation.org, tglx@linutronix.de, hpa@zytor.com,
linux-kernel@vger.kernel.org, mingo@kernel.org,
vincent.guittot@linaro.org
Subject: [tip:locking/core] sched/fair: Clean up comment in nohz_idle_balance()
Date: Tue, 11 Dec 2018 07:30:15 -0800 [thread overview]
Message-ID: <tip-80eb865768703c0f85a0603762742ae1dedf21f0@git.kernel.org> (raw)
In-Reply-To: <20181127110110.5533-1-andrea.parri@amarulasolutions.com>
Commit-ID: 80eb865768703c0f85a0603762742ae1dedf21f0
Gitweb: https://git.kernel.org/tip/80eb865768703c0f85a0603762742ae1dedf21f0
Author: Andrea Parri <andrea.parri@amarulasolutions.com>
AuthorDate: Tue, 27 Nov 2018 12:01:10 +0100
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 11 Dec 2018 14:54:57 +0100
sched/fair: Clean up comment in nohz_idle_balance()
Concerning the comment associated to the atomic_fetch_andnot() in
nohz_idle_balance(), Vincent explains [1]:
"[...] the comment is useless and can be removed [...] it was
referring to a line code above the comment that was present in
a previous iteration of the patchset. This line disappeared in
final version but the comment has stayed."
So remove the comment.
Vincent also points out that the full ordering associated to the
atomic_fetch_andnot() primitive could be relaxed, but this patch
insists on the current more conservative/fully ordered solution:
"Performance" isn't a concern, stay away from "correctness"/subtle
relaxed (re)ordering if possible..., just make sure not to confuse
the next reader with misleading/out-of-date comments.
[1] http://lkml.kernel.org/r/CAKfTPtBjA-oCBRkO6__npQwL3+HLjzk7riCcPU1R7YdO-EpuZg@mail.gmail.com
Suggested-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Andrea Parri <andrea.parri@amarulasolutions.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20181127110110.5533-1-andrea.parri@amarulasolutions.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
kernel/sched/fair.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index ac855b2f4774..db514993565b 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -9533,9 +9533,7 @@ static bool nohz_idle_balance(struct rq *this_rq, enum cpu_idle_type idle)
return false;
}
- /*
- * barrier, pairs with nohz_balance_enter_idle(), ensures ...
- */
+ /* could be _relaxed() */
flags = atomic_fetch_andnot(NOHZ_KICK_MASK, nohz_flags(this_cpu));
if (!(flags & NOHZ_KICK_MASK))
return false;
prev parent reply other threads:[~2018-12-11 15:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-27 11:01 [PATCH] sched/fair: Clean up comment in nohz_idle_balance() Andrea Parri
2018-11-27 14:41 ` Vincent Guittot
2018-12-11 15:30 ` tip-bot for Andrea Parri [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=tip-80eb865768703c0f85a0603762742ae1dedf21f0@git.kernel.org \
--to=tipbot@zytor.com \
--cc=andrea.parri@amarulasolutions.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--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).