Re: [RFC PATCH v4] sched: Fix performance regression introduced by mm_cid
From: Aaron Lu
Date: Wed Apr 12 2023 - 10:40:39 EST
On Wed, Apr 12, 2023 at 04:26:16PM +0200, Peter Zijlstra wrote:
> On Wed, Apr 12, 2023 at 07:42:40PM +0800, Aaron Lu wrote:
>
> > I *guess* you might be able to see some contention with hackbench on
> > that HSW-EX system with v4.
>
> Indeed! Notably it seems to be the wakeup from idle that trips it
> hardest:
Could it because for idle cpus, the per-cpu/mm cid is no longer valid for
the sake of compacting and when task wakes there, it will have to
re-allocate a new cid through mm_get_cid() which needs to acquire
mm->cid_lock?
> 11.31% 0.03% swapper [kernel.vmlinux] [k] schedule_idle
> |
> --11.28%--schedule_idle
> |
> --11.27%--__schedule
> |
> |--8.61%--mm_cid_get
> | |
> | --5.78%--_raw_spin_lock
> | |
> | --5.56%--native_queued_spin_lock_slowpath
> |
> |--0.81%--finish_task_switch.isra.0
> | |
> | --0.69%--asm_sysvec_call_function_single
> | |
> | --0.58%--sysvec_call_function_single
> |
> --0.57%--switch_mm_irqs_off
>
>
>