Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp1203938ybd; Wed, 26 Jun 2019 13:10:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqx8BsFeF75WywpsvKuuQbVlXzQqImpuPnm5Qf/Zs9u38idrsQJKWhJx8NNIRwXff6eRVr4k X-Received: by 2002:a17:90a:32c7:: with SMTP id l65mr1087658pjb.1.1561579824748; Wed, 26 Jun 2019 13:10:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561579824; cv=none; d=google.com; s=arc-20160816; b=porBVZWPpCkSCwPi2HroafvKmClnABcQBL5q7+bptXmQQwVTyR+JtRAWSG3U+fHfOV b3SSz2SERNdYiwywzGJjcIf9+4UdqaVbnatmOnjlt7QP2k1yK9jxSpUqFikDcq5i0ywE 2gsFLXodl5hnjWFV3Wq1kPPpJ4dch7E6a3T77CHQJXurA3dRpMYw0NMgG+lbzAs0Cb6Z ZFr9PUXUgKdJh4Nzzb3o73a0rH5+zoIpcEEvVoOl+V6pgvg6f7wIXuzEq1fDKWWi7lky Th3eb2jbQNo23npEYfGJ4ljhqY1bchEALI+eUx9BRZB9jHopjkpQgGoWukuNjtHsuMQj CabQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=cfryYhQWlErB8qLuDT5eClqd80feyFvnMssQdqAwvCM=; b=F6zJdy+tEsH5V0oP3PW3cvNgAHmyTYOQOBO5K97f5jj2yfsHogEm+pg5itEPGfhliO r7/hVfceeE54DhDyD21OVWCjs+WMeQgIfBj1V2A13uUu9l1hD84Anq0F1S+0HhGEYBQS bppDSSm/K7vFRh6LIvMYquX6Z/n6ae5o1nmqXlEIPV9kz/eBkisOoToPA93J12lHkiiR whfP6OcWIGZ9mYrLd+IT4OyPj+nZXF8d4ss9z3cMn0qLsWDidfKUHPoMZ85oe+R588P1 uH2SLrFdnFbcqo26jt/R8s1oiPft6P+WxLy5Hf9fmugNgRzVGcv4eIRanGanWF/ODpnb i/Rw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 70si96200pla.2.2019.06.26.13.10.08; Wed, 26 Jun 2019 13:10:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726360AbfFZUJK (ORCPT + 99 others); Wed, 26 Jun 2019 16:09:10 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:50267 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726271AbfFZUJJ (ORCPT ); Wed, 26 Jun 2019 16:09:09 -0400 Received: from p5b06daab.dip0.t-ipconnect.de ([91.6.218.171] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1hgEE4-0005om-0V; Wed, 26 Jun 2019 22:09:04 +0200 Date: Wed, 26 Jun 2019 22:09:03 +0200 (CEST) From: Thomas Gleixner To: Peter Zijlstra cc: "Raslan, KarimAllah" , "boris.ostrovsky@oracle.com" , "kvm@vger.kernel.org" , "kernellwp@gmail.com" , "joao.m.martins@oracle.com" , "linux-kernel@vger.kernel.org" , "konrad.wilk@oracle.com" , "mtosatti@redhat.com" , "pbonzini@redhat.com" , "ankur.a.arora@oracle.com" , "rkrcmar@redhat.com" Subject: Re: cputime takes cstate into consideration In-Reply-To: <20190626200126.GQ3419@hirez.programming.kicks-ass.net> Message-ID: References: <20190626145413.GE6753@char.us.oracle.com> <20190626161608.GM3419@hirez.programming.kicks-ass.net> <20190626183016.GA16439@char.us.oracle.com> <1561575336.25880.7.camel@amazon.de> <20190626192100.GP3419@hirez.programming.kicks-ass.net> <1561577254.25880.15.camel@amazon.de> <20190626200126.GQ3419@hirez.programming.kicks-ass.net> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-1806125090-1561579744=:32342" X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1806125090-1561579744=:32342 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT On Wed, 26 Jun 2019, Peter Zijlstra wrote: > On Wed, Jun 26, 2019 at 07:27:35PM +0000, 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. > > That's utter nonsense; what's the point of exposing mwait to guests if > you're not doing vcpu pinning. For overloaded guests mwait makes no > sense what so ever. I think you misunderstood. The guests are pinned. What they can do today is monitor the guests utilization time through mwait/vmexit. If that goes over a certain threshold they can automatically launch more VMs to spread the load. With MWAIT in the guest this is gone... Thanks, tglx --8323329-1806125090-1561579744=:32342--