From: Shrikanth Hegde <sshegde@linux.ibm.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: mingo@kernel.org, peterz@infradead.org, dietmar.eggemann@arm.com,
qyousef@layalina.io, linux-kernel@vger.kernel.org,
vschneid@redhat.com, qperret@google.com, yu.c.chen@intel.com,
srikar@linux.ibm.com, pierre.gondois@arm.com
Subject: Re: [PATCH 1/2] sched/fair: Check rd->overload value before update
Date: Thu, 21 Mar 2024 22:51:14 +0530 [thread overview]
Message-ID: <7080aa6d-34e4-4d25-9f1b-95ba07f0e6bb@linux.ibm.com> (raw)
In-Reply-To: <CAKfTPtBYAibCdsPumTAPDKBwNfLP9nr5577MSNKffV_VDmHDgA@mail.gmail.com>
On 3/21/24 1:14 PM, Vincent Guittot wrote:
> On Wed, 13 Mar 2024 at 16:02, Shrikanth Hegde <sshegde@linux.ibm.com> wrote:
>>
Hi Vincent. Thanks for taking a look and review it.
>>
>> Perf probes prove that actual change in value is less often. So it would
>> be better to check the value before updating it. Detailed perf probes
>> and annotation can be found in the cover letter. CPU bus traffic reduces
>
> the cover letter will not be merged. It's better to put the figures
> here if you want to mention them
ok. yes, since it was long i didnt put here. maybe i can put hackbench results
here in the changelog. rest can be found in cover-letter if one is interested.
>
>> with the patch.
>>
>> Fixes: 630246a06ae2 ("sched/fair: Clean-up update_sg_lb_stats parameters")
>
> I don't think it's worth a Fixes tag. This is an improvement more than
> a fix as the current code works fine but generates more bus traffic
>
got it. will remove it. I wasn't sure if I have to put it.
> With these minor changes in the commit message:
>
> Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
>
Thank you! I will send out v2 with these minor edits.
>> Signed-off-by: Shrikanth Hegde <sshegde@linux.ibm.com>
>> ---
>> kernel/sched/fair.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
>> index 02d4d224b436..eeebadd7d9ae 100644
>> --- a/kernel/sched/fair.c
>> +++ b/kernel/sched/fair.c
>> @@ -10621,7 +10621,8 @@ static inline void update_sd_lb_stats(struct lb_env *env, struct sd_lb_stats *sd
>>
>> if (!env->sd->parent) {
>> /* update overload indicator if we are at root domain */
>> - WRITE_ONCE(env->dst_rq->rd->overload, sg_status & SG_OVERLOAD);
>> + if (READ_ONCE(env->dst_rq->rd->overload) != (sg_status & SG_OVERLOAD))
>> + WRITE_ONCE(env->dst_rq->rd->overload, sg_status & SG_OVERLOAD);
>>
>> /* Update over-utilization (tipping point, U >= 0) indicator */
>> set_rd_overutilized_status(env->dst_rq->rd,
>> --
>> 2.39.3
>>
next prev parent reply other threads:[~2024-03-21 17:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-13 15:01 [PATCH 0/2] sched: Minor changes for rd->overload access Shrikanth Hegde
2024-03-13 15:01 ` [PATCH 1/2] sched/fair: Check rd->overload value before update Shrikanth Hegde
2024-03-21 7:44 ` Vincent Guittot
2024-03-21 17:21 ` Shrikanth Hegde [this message]
2024-03-13 15:01 ` [PATCH 2/2] sched/fair: Use helper functions to access rd->overload Shrikanth Hegde
2024-03-21 8:01 ` Vincent Guittot
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=7080aa6d-34e4-4d25-9f1b-95ba07f0e6bb@linux.ibm.com \
--to=sshegde@linux.ibm.com \
--cc=dietmar.eggemann@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=pierre.gondois@arm.com \
--cc=qperret@google.com \
--cc=qyousef@layalina.io \
--cc=srikar@linux.ibm.com \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=yu.c.chen@intel.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®