[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1906262129200.32342@nanos.tec.linutronix.de>
Date: Wed, 26 Jun 2019 21:32:35 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: "Raslan, KarimAllah" <karahmed@...zon.de>
cc: "peterz@...radead.org" <peterz@...radead.org>,
"boris.ostrovsky@...cle.com" <boris.ostrovsky@...cle.com>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"kernellwp@...il.com" <kernellwp@...il.com>,
"joao.m.martins@...cle.com" <joao.m.martins@...cle.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"konrad.wilk@...cle.com" <konrad.wilk@...cle.com>,
"mtosatti@...hat.com" <mtosatti@...hat.com>,
"pbonzini@...hat.com" <pbonzini@...hat.com>,
"ankur.a.arora@...cle.com" <ankur.a.arora@...cle.com>,
"rkrcmar@...hat.com" <rkrcmar@...hat.com>
Subject: Re: cputime takes cstate into consideration
On Wed, 26 Jun 2019, Raslan, KarimAllah wrote:
> On Wed, 2019-06-26 at 21:21 +0200, Peter Zijlstra wrote:
> > On Wed, Jun 26, 2019 at 06:55:36PM +0000, Raslan, KarimAllah wrote:
> >
> > >
> > > If the host is completely in no_full_hz mode and the pCPU is dedicated to a
> > > single vCPU/task (and the guest is 100% CPU bound and never exits), you would
> > > still be ticking in the host once every second for housekeeping, right? Would
> > > not updating the mwait-time once a second be enough here?
> >
> > People are trying very hard to get rid of that remnant tick. Lets not
> > add dependencies to it.
> >
> > IMO this is a really stupid issue, 100% time is correct if the guest
> > does idle in pinned vcpu mode.
>
> One use case for proper accounting (obviously for a slightly relaxed definition
> or *proper*) is *external* monitoring of CPU utilization for scaling group
> (i.e. more VMs will be launched when you reach a certain CPU utilization).
> These external monitoring tools needs to account CPU utilization properly.
Then you need a trusted cooperative guest and that can give you the
information. If it doesn't, then either do not give him MWAIT or the scheme
does not work.
If you can afford to waste performance counters for that, you can do that
from user space.
There are lots of options, but the kernel won't chose one because it's
guaranteed to be the wrong choice for most scenarios.
Thanks,
tglx
Powered by blists - more mailing lists