[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <BL1PR11MB600349514E682268F50921699607A@BL1PR11MB6003.namprd11.prod.outlook.com>
Date: Mon, 1 Sep 2025 13:24:09 +0000
From: "Deng, Pan" <pan.deng@...el.com>
To: "Chen, Yu C" <yu.c.chen@...el.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "Li,
Tianyou" <tianyou.li@...el.com>, "tim.c.chen@...ux.intel.com"
<tim.c.chen@...ux.intel.com>, "peterz@...radead.org" <peterz@...radead.org>,
"mingo@...nel.org" <mingo@...nel.org>, Chen Yu <yu.chen.surf@...il.com>
Subject: RE: [PATCH 1/4] sched/rt: Optimize cpupri_vec layout to mitigate
cache line contention
Thanks Yu, will update the patch.
Best Regards
Pan
> -----Original Message-----
> From: Chen, Yu C <yu.c.chen@...el.com>
> Sent: Monday, September 1, 2025 1:10 PM
> To: Deng, Pan <pan.deng@...el.com>
> Cc: linux-kernel@...r.kernel.org; Li, Tianyou <tianyou.li@...el.com>;
> tim.c.chen@...ux.intel.com; peterz@...radead.org; mingo@...nel.org; Chen Yu
> <yu.chen.surf@...il.com>
> Subject: Re: [PATCH 1/4] sched/rt: Optimize cpupri_vec layout to mitigate cache
> line contention
>
> On 7/7/2025 10:35 AM, Pan Deng wrote:
> > When running a multi-instance FFmpeg workload on an HCC system,
> significant
> > cache line contention is observed around `cpupri_vec->count` and `mask` in
> > struct root_domain.
> >
>
> [it seems that my last reply did not make it to the lkml][snip]
>
> > diff --git a/kernel/sched/cpupri.h b/kernel/sched/cpupri.h
> > index d6cba0020064..245b0fa626be 100644
> > --- a/kernel/sched/cpupri.h
> > +++ b/kernel/sched/cpupri.h
> > @@ -9,7 +9,7 @@
> >
> > struct cpupri_vec {
> > atomic_t count;
> > - cpumask_var_t mask;
> > + cpumask_var_t mask ____cacheline_aligned;
>
> Just curious, since this is to avoid cache contention among CPUs,
> is it better to use ____cacheline_aligned_in_smp, so the single
> CPU system is not impacted.
>
> thanks,
> Chenyu> };
> >
> > struct cpupri {
Powered by blists - more mailing lists