Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp1198320ybd; Wed, 26 Jun 2019 13:04:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqzyHizGZhDnua7BYcK3cWR6q/HMmQNwiI7+0b2ukAew1OKnEpPat3M+CHCUKftwu55fN2CN X-Received: by 2002:a63:fc15:: with SMTP id j21mr4629092pgi.217.1561579455859; Wed, 26 Jun 2019 13:04:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561579455; cv=none; d=google.com; s=arc-20160816; b=cgrCjpG21dJeZOFxMvaK4+UPZ9QxunamYQ8n2ujeKog6za8D1WOOyExyVTiymB2y28 wvMcvYvKHhSAzmjmMhG3531ywX83OsM0mxZ0MKWSDcgjCLn3TCBDBvMRKe3hTSrl8bnE yEVWwin0S1EgUkySqmCsmwsAk6JZhdG9PI05UId/5GMlv1SRokMxPROeycsLmgBNWCLH ZHWFMiWe3PW7ql0rwlprbpZTE/VKTw4Ym05kQsTfYFqk3mlI94IM7gHmftTVKviY3/Hq wJLvJUJ+K5PzPwS0jlCcEGkqbJlMNAd7uqX4OLxhhK9sj2hwOuWUtIl0bujZjikDsFHv bsYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=rhSqThBTCa1k8P1tTRPVXVwrdSMZo/v6odhBP0gdvBk=; b=q7xr5/qmlZN5JcWA6JjqdT838lbg9Nur26/0xyZCCxIk0MizaPRo1McqE1CFxrTJjz w71q0Cu+4FmjDEk/PfoS/PIGjv9PifG6WXpM9MEr4HpwhrX/XrPW0Ifs9thi0dJWlIYE v5vTv2w2hbOPao64wr7haGkDfc5uykLcXxyFrjmx22Y4qTfHAalcwvElelPm1hoY0t11 3bB/sNAeymHTiK0QURELUwyjtfBlH4gMkkv3oplB8qiBFT843+EmoN9XkcRWV7lgwX6l qxQwZujLcG+wGIKwpT36X0eeTRUm0lP6/sK9LgmNVNtw3It1do+9iYS/ET9N+9KCEYfx gb8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=SS3FHZ6u; 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 l14si946096pga.567.2019.06.26.13.03.58; Wed, 26 Jun 2019 13:04:15 -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; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=SS3FHZ6u; 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 S1726616AbfFZUBj (ORCPT + 99 others); Wed, 26 Jun 2019 16:01:39 -0400 Received: from merlin.infradead.org ([205.233.59.134]:47976 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726104AbfFZUBh (ORCPT ); Wed, 26 Jun 2019 16:01:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=rhSqThBTCa1k8P1tTRPVXVwrdSMZo/v6odhBP0gdvBk=; b=SS3FHZ6u9lz4R2EUrAQpCQI5li HrRK43VRWLnnnykP67sWXJbu2X9zYvTA56MH/pJ7XJZ0n54mGXyPkpMNhFhs1iSrlIEosjXe450zW BsxLWbz42F0NEACZK6XswOljjcsspH3IbBvEKY5jD+Db4WcVNpe3joe61/YdVmZTU4g9jgz+th7AG sRiTg5NK3utvyfH8op3t/sGuPbJ5DIYXhWl4rC8SUTwnXeSvJ6y0K7Hdcq5Wb775sSt0OHgk0RFw5 OTe5YBzlvOGEnLWzsJW7Vg+4raEhAt7aky5WdGO2rf0g0u53igmF6wg/Owyl6F7WiaHo3BcVPmhNZ Eyf3qaeg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hgE6h-0001Xf-QR; Wed, 26 Jun 2019 20:01:28 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 11FF9209CEDA8; Wed, 26 Jun 2019 22:01:26 +0200 (CEST) Date: Wed, 26 Jun 2019 22:01:26 +0200 From: Peter Zijlstra To: "Raslan, KarimAllah" Cc: "boris.ostrovsky@oracle.com" , "kvm@vger.kernel.org" , "kernellwp@gmail.com" , "joao.m.martins@oracle.com" , "linux-kernel@vger.kernel.org" , "tglx@linutronix.de" , "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 Message-ID: <20190626200126.GQ3419@hirez.programming.kicks-ass.net> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1561577254.25880.15.camel@amazon.de> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.