lkml.org 
[lkml]   [2023]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: rq lock contention due to commit af7f588d8f73
On Mon, Mar 27, 2023 at 11:09:51AM +0200, Peter Zijlstra wrote:
> 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?

Confirmed the problem is gone after disabling it through menuconfig with
the below diff applied on top of v6.3-rc4.

>
> (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

\
 
 \ /
  Last update: 2023-03-27 12:44    [W:1.001 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site