lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CALOAHbDV9p0nbyjwKQWrNyDbGt2xnYVcn6RA7TNFcp-TBz9gAw@mail.gmail.com>
Date: Sat, 26 Apr 2025 18:43:03 +0800
From: Yafang Shao <laoar.shao@...il.com>
To: Eric Dumazet <edumazet@...gle.com>
Cc: Ingo Molnar <mingo@...hat.com>, Peter Zijlstra <peterz@...radead.org>, 
	Juri Lelli <juri.lelli@...hat.com>, Vincent Guittot <vincent.guittot@...aro.org>, 
	Dietmar Eggemann <dietmar.eggemann@....com>, Steven Rostedt <rostedt@...dmis.org>, 
	Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>, 
	Valentin Schneider <vschneid@...hat.com>, linux-kernel <linux-kernel@...r.kernel.org>, 
	Eric Dumazet <eric.dumazet@...il.com>, Sean Christopherson <seanjc@...gle.com>, 
	Josh Don <joshdon@...gle.com>
Subject: Re: [PATCH] sched/fair: reduce false sharing on sched_balance_running

On Sat, Apr 26, 2025 at 12:22 AM Eric Dumazet <edumazet@...gle.com> wrote:
>
> On Thu, Apr 24, 2025 at 7:29 PM Yafang Shao <laoar.shao@...il.com> wrote:
> >
> > On Thu, Apr 24, 2025 at 11:50 PM Eric Dumazet <edumazet@...gle.com> wrote:
> > >
> > > On Thu, Apr 24, 2025 at 7:46 AM Yafang Shao <laoar.shao@...il.com> wrote:
> > > >
> > > > On Thu, Apr 24, 2025 at 1:46 AM Eric Dumazet <edumazet@...gle.com> wrote:
> > > > >
> > > > > rebalance_domains() can attempt to change sched_balance_running
> > > > > more than 350,000 times per second on our servers.
> > > > >
> > > > > If sched_clock_irqtime and sched_balance_running share the
> > > > > same cache line, we see a very high cost on hosts with 480 threads
> > > > > dealing with many interrupts.
> > > >
> > > > CONFIG_IRQ_TIME_ACCOUNTING is enabled on your systems, right?
> > > > Have you observed any impact on task CPU utilization measurements due
> > > > to this configuration? [0]
> > > >
> > > > If cache misses on sched_clock_irqtime are indeed the bottleneck,  why
> > > > not align it to improve performance?
> > >
> > > "Align it" meaning what exactly ?
> >
> > Such as :
> >
> > static __cacheline_aligned_in_smp int sched_clock_irqtime;
>
> Please look at __read_mostly attribute instead.

Right, sched_clock_irqtime is only modified when the TSC becomes
unstable, so it makes sense to annotate it as __read_mostly. So why
not do it?

-- 
Regards
Yafang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ