sched/fair: Clean up comment in nohz_idle_balance()
PATCH 1/1 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
--- kernel/sched/fair.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
kernel/sched/fair.c +1 -3
@@ -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;
Signature · 1 line
2.17.1
Vincent Guittot
maintainerQuoted 19 lines · Andrea Parri
Concerning the comment associated to the
atomic_fetch_andnot()innohz_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.
Quoted 7 lines
[1] http://lkml.kernel.org/r/CAKfTPtBjA-oCBRkO6__npQwL3+HLjzk7riCcPU1R7YdO-EpuZg@mail.gmail.com
Suggested-by Vincent Guittot <[email protected]>Signed-off-by Andrea Parri <[email protected]>Cc Ingo Molnar <[email protected]>Cc Peter Zijlstra <[email protected]>Cc Vincent Guittot <[email protected]>
Looks good to me
Quoted 22 lines
--- kernel/sched/fair.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)kernel/sched/fair.c +1
-4@@ -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; --2.17.1
tip-bot for Andrea Parri
merge botsched/fair: Clean up comment in nohz_idle_balance()
Commit-ID: 80eb865768703c0f85a0603762742ae1dedf21f0 Gitweb: https://git.kernel.org/tip/80eb865768703c0f85a0603762742ae1dedf21f0 Author: Andrea Parri <[email protected]> AuthorDate: Tue, 27 Nov 2018 12:01:10 +0100 Committer: Ingo Molnar <[email protected]> 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
--- kernel/sched/fair.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
kernel/sched/fair.c +1 -3
@@ -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;