Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp1128322ybd; Wed, 26 Jun 2019 11:41:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqxsUxyDXcK2KCgeYeg0X0m1TmL951jIylrVkVZp0uNTQSyITjwDfMbYkTSOUwt3U87m710b X-Received: by 2002:a17:902:24c:: with SMTP id 70mr7147655plc.2.1561574505290; Wed, 26 Jun 2019 11:41:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561574505; cv=none; d=google.com; s=arc-20160816; b=Pd3kkOCo5IKrFzEQmhevO2cLOsr4TymPxiMlO9FW9dozUtyHGEC/o4c3ppI86orirK PZ2leTUvWG73i8VQAE4h/Uhwlw8R+o5uDcHYiiSg9oVbSZo8ki+XJmnxOxGkyOTIi87P nGUxnS16DJhfUVBh0nPO+IppvaBRjnzJtj6OdVS5PeEm99tl8l/h0Mq4aFpS3u0Y1cuj pa67BWMiAIZ4rPzq4sxKi2ERZ8z8kg8jkA9sPM9bHjEWKmXiq1fomijoTNQEv26eR7DQ hLfw4NCyzSz6hVvmY23rsklTav+4ZUkkOYQdM1V4tO12v+5g2Tz23PKyCOtCtruBztTd nC+g== 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=uy3zu4H2wM03hPlJdYRdy63TqbsmUhQyOeg8C0M0iCk=; b=dqPbroo9vLKxxAy0yFG/7/y9XXqKGVdQpF1xEtWy9OgKSZNgdKxGnO8a5tTFxtzMiP GKqnD8bZhsvg1lgKpAUEG/6oF1Deoa0CzM3c3XNMM9qi+xqJU2fvS+lNh+69hhjqatkA ANbKzobSQXH0Rx458n/DOjSbYxA10i6KNy3AWEMBikZPbDv5Q4gGPM5Y+8lgZHLjBoMk +VOgtN5TZ+WMajfKUpPHgh0TB+75Bt4gMS/Qo42Z5Z23jobG25+xPhE6yBedtlw23zG1 Kre2rTuMteY9/t6ph9Qga63JtbKLJnAsmP9jB7MfajDpJvGnWdg3p7jZqQwmTolrhfKQ ZMyg== 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 t14si3907676plr.53.2019.06.26.11.41.28; Wed, 26 Jun 2019 11:41:45 -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 S1726420AbfFZSlS (ORCPT + 99 others); Wed, 26 Jun 2019 14:41:18 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:50102 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726227AbfFZSlR (ORCPT ); Wed, 26 Jun 2019 14:41:17 -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 1hgCqw-00038t-7w; Wed, 26 Jun 2019 20:41:06 +0200 Date: Wed, 26 Jun 2019 20:41:04 +0200 (CEST) From: Thomas Gleixner To: Konrad Rzeszutek Wilk cc: Peter Zijlstra , Boris Ostrovsky , Ankur Arora , Joao Martins , Wanpeng Li , Paolo Bonzini , Radim Krcmar , Marcelo Tosatti , KarimAllah , LKML , kvm Subject: Re: cputime takes cstate into consideration In-Reply-To: <20190626183016.GA16439@char.us.oracle.com> Message-ID: References: <20190626145413.GE6753@char.us.oracle.com> <20190626161608.GM3419@hirez.programming.kicks-ass.net> <20190626183016.GA16439@char.us.oracle.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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 On Wed, 26 Jun 2019, Konrad Rzeszutek Wilk wrote: > On Wed, Jun 26, 2019 at 06:16:08PM +0200, Peter Zijlstra wrote: > > On Wed, Jun 26, 2019 at 10:54:13AM -0400, Konrad Rzeszutek Wilk wrote: > > > There were some ideas that Ankur (CC-ed) mentioned to me of using the perf > > > counters (in the host) to sample the guest and construct a better > > > accounting idea of what the guest does. That way the dashboard > > > from the host would not show 100% CPU utilization. > > > > But then you generate extra noise and vmexits on those cpus, just to get > > this accounting sorted, which sounds like a bad trade. > > Considering that the CPUs aren't doing anything and if you do say the > IPIs "only" 100/second - that would be so small but give you a big benefit > in properly accounting the guests. The host doesn't know what the guest CPUs are doing. And if you have a full zero exit setup and the guest is computing stuff or doing that network offloading thing then they will notice the 100/s vmexits and complain. > But perhaps there are other ways too to "snoop" if a guest is sitting on > an MWAIT? No idea. Thanks, tglx