Re: rq lock contention due to commit af7f588d8f73

From: Linux regression tracking #adding (Thorsten Leemhuis)
Date: Tue Apr 04 2023 - 05:53:17 EST


[CCing the regression list, as it should be in the loop for regressions:
https://docs.kernel.org/admin-guide/reporting-regressions.html]

[TLDR: I'm adding this report to the list of tracked Linux kernel
regressions; the text you find below is based on a few templates
paragraphs you might have encountered already in similar form.
See link in footer if these mails annoy you.]

On 27.03.23 10:05, Aaron Lu wrote:
>
> 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
>

Thanks for the report. To be sure the issue doesn't fall through the
cracks unnoticed, I'm adding it to regzbot, the Linux kernel regression
tracking bot:

#regzbot ^introduced af7f588d8f73
#regzbot monitor
https://lore.kernel.org/lkml/20230403181342.210896-1-mathieu.desnoyers@xxxxxxxxxxxx/
#regzbot monitor
https://lore.kernel.org/all/20230330230911.228720-1-mathieu.desnoyers@xxxxxxxxxxxx/
#regzbot title sched: PostgreSQL performance regression introduced by mm_cid
#regzbot ignore-activity

This isn't a regression? This issue or a fix for it are already
discussed somewhere else? It was fixed already? You want to clarify when
the regression started to happen? Or point out I got the title or
something else totally wrong? Then just reply and tell me -- ideally
while also telling regzbot about it, as explained by the page listed in
the footer of this mail.

Developers: When fixing the issue, remember to add 'Link:' tags pointing
to the report (the parent of this mail). See page linked in footer for
details.

Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
--
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
That page also explains what to do if mails like this annoy you.