lkml.org 
[lkml]   [2024]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC] cputime: Introduce option to force full dynticks accounting on NOHZ & NOHZ_IDLE CPUs
From
On Mon, Feb 19, 2024, 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.

..

> NOTE: This wasn't tested in depth, and it's mostly intended to highlight
> the issue we're trying to solve. Also ccing KVM folks, since it's
> relevant to guest CPU usage accounting.

How bad is the synchronization issue on upstream kernels? We tried to address
that in commit 160457140187 ("KVM: x86: Defer vtime accounting 'til after IRQ handling").

I don't expect it to be foolproof, but it'd be good to know if there's a blatant
flaw and/or easily closed hole.

\
 
 \ /
  Last update: 2024-05-27 15:13    [W:0.133 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site