From: Abel Wu <wuyun.abel@bytedance.com>
To: chenying <chenying.kernel@bytedance.com>,
mingo@redhat.com, Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Benjamin Segall <bsegall@google.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Reduce rq lock contention in load_balance()
Date: Thu, 8 Dec 2022 17:07:52 +0800 [thread overview]
Message-ID: <c086b5fb-681e-d104-1e11-873ed5444c5c@bytedance.com> (raw)
In-Reply-To: <ef54b130-e727-5ed1-1a4e-1e3c0a713b98@bytedance.com>
Hi Ying,
On 11/24/22 5:07 PM, chenying wrote:
> ...
> diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
> index a4a20046e586..384690bda8c3 100644
> --- a/kernel/sched/sched.h
> +++ b/kernel/sched/sched.h
> @@ -954,6 +954,7 @@ struct balance_callback {
> struct rq {
> /* runqueue lock: */
> raw_spinlock_t __lock;
> + raw_spinlock_t lb_lock;
Do we really need a new lock for doing this? I may suggest the
following:
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 87522c3de7b2..30d84e066a9a 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1048,6 +1048,7 @@ struct rq {
struct balance_callback *balance_callback;
+ unsigned char balancing;
unsigned char nohz_idle_balance;
unsigned char idle_balance;
and skip in-balancing runqueues early when find_busiest_queue().
Thanks,
Abel
>
> /*
> * nr_running and cpu_load should be in the same cacheline because
next prev parent reply other threads:[~2022-12-08 9:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-24 9:07 chenying
2022-12-08 9:07 ` Abel Wu [this message]
2022-12-13 3:13 ` [PATCH] sched: " chenying
2022-12-13 16:09 ` Chen Yu
2022-12-14 12:10 ` [External] " chenying
2022-12-16 7:23 ` Abel Wu
2022-12-16 7:36 ` Abel Wu
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=c086b5fb-681e-d104-1e11-873ed5444c5c@bytedance.com \
--to=wuyun.abel@bytedance.com \
--cc=bsegall@google.com \
--cc=chenying.kernel@bytedance.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.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
all inboxes | Powered by JetHome®