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]
Date: Wed, 13 Mar 2024 00:13:13 +0100
From: Frederic Weisbecker <frederic@...nel.org>
To: Nicolas Saenz Julienne <nsaenz@...zon.com>
Cc: jalliste@...zon.co.uk, mhiramat@...nel.org, akpm@...ux-foundation.org,
	pmladek@...e.com, rdunlap@...radead.org, tsi@...oix.net,
	nphamcs@...il.com, gregkh@...uxfoundation.org,
	linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
	pbonzini@...hat.com, seanjc@...gle.com, paulmck@...nel.org
Subject: Re: [RFC] cputime: Introduce option to force full dynticks
 accounting on NOHZ & NOHZ_IDLE CPUs

Le Mon, Mar 11, 2024 at 05:15:26PM +0000, Nicolas Saenz Julienne a écrit :
> Hi Frederic,
> 
> On Mon Feb 19, 2024 at 5:57 PM UTC, Nicolas Saenz Julienne wrote:
> > Under certain extreme conditions, the tick-based cputime accounting may
> > produce inaccurate data. For instance, guest CPU usage is sensitive to
> > interrupts firing right before the tick's expiration. This forces the
> > guest into kernel context, and has that time slice wrongly accounted as
> > system time. This issue is exacerbated if the interrupt source is in
> > sync with the tick, significantly skewing usage metrics towards system
> > time.
> >
> > On CPUs with full dynticks enabled, cputime accounting leverages the
> > context tracking subsystem to measure usage, and isn't susceptible to
> > this sort of race conditions. However, this imposes a bigger overhead,
> > including additional accounting and the extra dyntick tracking during
> > user<->kernel<->guest transitions (RmW + mb).
> >
> > So, in order to get the best of both worlds, introduce a cputime
> > configuration option that allows using the full dynticks accounting
> > scheme on NOHZ & NOHZ_IDLE CPUs, while avoiding the expensive
> > user<->kernel<->guest dyntick transitions.
> >
> > Signed-off-by: Nicolas Saenz Julienne <nsaenz@...zon.com>
> > Signed-off-by: Jack Allister <jalliste@...zon.co.uk>
> > ---
> 
> Would you be opposed to introducing a config option like this? Any
> alternatives you might have in mind?

I'm not opposed to the idea no. It is not the first time I hear about people
using generic virt Cputime accounting for precise stime/utime measurements on
benchmarks. But let me sit down and have a look at your patch. Once I find
my way through performance regression reports and rcutorture splats anyway...

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ