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] [thread-next>] [day] [month] [year] [list]
Date: Mon, 11 Mar 2024 17:15:26 +0000
From: Nicolas Saenz Julienne <nsaenz@...zon.com>
To: <frederic@...nel.org>
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>, <nsaenz@...zon.com>
Subject: Re: [RFC] cputime: Introduce option to force full dynticks
 accounting on NOHZ & NOHZ_IDLE CPUs

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?

Nicolas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ