Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp1171674ybd; Wed, 26 Jun 2019 12:31:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqw/djoc9rep9NcYLWy4vXvLkktr6akFHL0M0+YOCSvfeUJVNOFzhhrh3NmVRB0SkpT9/rj5 X-Received: by 2002:a17:902:1102:: with SMTP id d2mr7325144pla.149.1561577476952; Wed, 26 Jun 2019 12:31:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561577476; cv=none; d=google.com; s=arc-20160816; b=o0iI89GaA1gDbibIHsCa27pC9OaIX0FYrszYE4X6C6mp9RUKGyOsOtIUUjH9Ci8P// Y/+QgAHmdJQ8ViRlEhXiP2spg9G4QZcmnWR0yH+JgKTTYi+Iy5Q0dvHrbfh8+9Kvg9LZ OC6XK5kpa3SiMJ8Ict6sM+LmBVZ4wzdhNV1cKQIw3rRyswoddjqZjtznkOW87HDMxUNg 4DjiSdLvc9OmylOFRIJvLeSejMqA10E72l6TfzRpeuMWU1lnsbZdwRFga+iLvNfskxgr 4J3zR02zV0WMxb6H5j5ZlaWkEbEBzlmbo6cRhJe0ixzhXqTmixYL+Um8ZPRqz4jtR2Yn sVwg== 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=tELCXEArd7H2YHBbwFX96CvOg82PaHbiCWbkP3IqeaY=; b=grss2a1usd+3YFKcpKKezpxBXzaEFJ7araTKlrC8flEOrz5STYa0lBybSwRaNJahDZ cHZRUNJ06AEu6LhlyyfoxP4xEFaRuvqcFgeo109SuhortmY5KhKstu85+DU3JfmaX728 wGysSYKBmcOYTWZOvv1iwYELrKAhfQK3JF5wfhwNCI0BqowTTiuTFhSIZ0Mjg6Jd+P3D qILBSrmZbyyqH9COP54JR2o+ukWFWidqa+VnlSsCYrDj0xxzSqxq+JpQB+HAqeqD7r+a kWPJwx+/fD/uBPSDGUdzdzeZs3+awJ8V2lbBspu8njQuHg+BYEGnOuDfDgAp5IGisa3c 8rWg== 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 18si13137901pgn.70.2019.06.26.12.31.00; Wed, 26 Jun 2019 12:31:16 -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 S1726445AbfFZT3K (ORCPT + 99 others); Wed, 26 Jun 2019 15:29:10 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:50197 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726293AbfFZT3J (ORCPT ); Wed, 26 Jun 2019 15:29: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 1hgDbL-0004S2-55; Wed, 26 Jun 2019 21:29:03 +0200 Date: Wed, 26 Jun 2019 21:29:02 +0200 (CEST) From: Thomas Gleixner To: Peter Zijlstra cc: "Raslan, KarimAllah" , "konrad.wilk@oracle.com" , "boris.ostrovsky@oracle.com" , "joao.m.martins@oracle.com" , "kvm@vger.kernel.org" , "kernellwp@gmail.com" , "linux-kernel@vger.kernel.org" , "mtosatti@redhat.com" , "pbonzini@redhat.com" , "ankur.a.arora@oracle.com" , "rkrcmar@redhat.com" Subject: Re: cputime takes cstate into consideration In-Reply-To: <20190626192100.GP3419@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> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-1592477559-1561577343=: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-1592477559-1561577343=: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 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. Correct. We are going to see the same issue with UMWAIT/UMONITOR. If the timeout is set long enough by the admin, then a task can stay in user mode UMWAIT for a very long time. And we're going to account that as user time. That's not any different with a guest. You might go there and establish a shared page with the guest where the guest drops his internal accounting information. For trusted guests that might be a good approximation. For untrusted ones not so much, but then you just have to say, you occupy the CPU 100% in guest mode. If you idle there, none of my problems. Thanks, tglx --8323329-1592477559-1561577343=:32342--