From: Peter Zijlstra <peterz@infradead.org>
To: Aaron Lu <aaron.lu@intel.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
linux-kernel@vger.kernel.org
Subject: Re: rq lock contention due to commit af7f588d8f73
Date: Mon, 27 Mar 2023 11:09:51 +0200 [thread overview]
Message-ID: <20230327090951.GA4253@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20230327080502.GA570847@ziqianlu-desk2>
On Mon, Mar 27, 2023 at 04:05:02PM +0800, Aaron Lu wrote:
> Hi Mathieu,
>
> I was doing some optimization work[1] for kernel scheduler using a
> database workload: sysbench+postgres and before I submit my work, I
> rebased my patch on top of latest v6.3-rc kernels to see if everything
> still works expected and then I found rq's lock became very heavily
> contended as compared to v6.2 based kernels.
>
> Using the above mentioned workload, before commit af7f588d8f73("sched:
> Introduce per-memory-map concurrency ID"), the profile looked like:
>
> 7.30% 0.71% [kernel.vmlinux] [k] __schedule
> 0.03% 0.03% [kernel.vmlinux] [k] native_queued_spin_lock_slowpath
>
> After that commit:
>
> 49.01% 0.87% [kernel.vmlinux] [k] __schedule
> 43.20% 43.18% [kernel.vmlinux] [k] native_queued_spin_lock_slowpath
Unlike what the subject says, if it is due to that commit, then it's not
rq lock but that new cid_lock thing.
Can you frob init/Kconfig and make SCHED_MM_CID user configurable and
disable it to confirm?
(also, mathieu, when you do the below, you'll see it is in a weird spot)
diff --git a/init/Kconfig b/init/Kconfig
index 1fb5f313d18f..f2661f73f3dd 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1042,7 +1042,8 @@ config RT_GROUP_SCHED
endif #CGROUP_SCHED
config SCHED_MM_CID
- def_bool y
+ bool "RSEQ Concurrency ID"
+ default y
depends on SMP && RSEQ
config UCLAMP_TASK_GROUP
next prev parent reply other threads:[~2023-03-27 9:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-27 8:05 rq lock contention due to commit af7f588d8f73 Aaron Lu
2023-03-27 9:09 ` Peter Zijlstra [this message]
2023-03-27 10:14 ` Aaron Lu
2023-03-27 10:42 ` Aaron Lu
2023-03-27 13:20 ` Mathieu Desnoyers
2023-03-27 14:04 ` Aaron Lu
2023-03-27 14:11 ` Mathieu Desnoyers
2023-03-27 19:57 ` Mathieu Desnoyers
2023-03-28 6:58 ` Aaron Lu
2023-03-28 12:39 ` Mathieu Desnoyers
2023-03-28 13:07 ` Aaron Lu
2023-03-29 7:45 ` Aaron Lu
2023-03-29 18:07 ` Mathieu Desnoyers
2023-04-04 9:53 ` Linux regression tracking #adding (Thorsten Leemhuis)
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=20230327090951.GA4253@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=aaron.lu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.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