Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5096107imu; Tue, 8 Jan 2019 11:24:52 -0800 (PST) X-Google-Smtp-Source: ALg8bN4Anw2T6wcVtdLvGlu4RpOAqSw+aCaJ3DJbEy5X7tY+OC2fzwAm9oGvhwuzhPEiWwp6meDm X-Received: by 2002:a62:6e07:: with SMTP id j7mr3038173pfc.135.1546975492371; Tue, 08 Jan 2019 11:24:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546975492; cv=none; d=google.com; s=arc-20160816; b=ErSYO7Nhjw0ENcpalJnGZHxWjCbo6zWd+hDHqQ02WxA6keF4y4vFXBTXYwUn7Hn4hk N0fWa8RiiDdMZJpNYYfoDjmfEvPPiLQsObw1okk/yu2EwXLOtKmgi7LzWlMcyDVCGIpn 82cT7AstCW2AbyAw5JfdpbQGrxu7iV2FWnvu8jgTgk2Zh6Lj3pOUCtLVetNBqmRBKW7B aY28geLI/4A9zsKuOBlMMdrMrU02r6tnppEXmrP1a76dct8ObIYDgcoqhCwGlwo677Wn hDdD3yCBbpPWnQ+7OyyeR+79FjRsEkoXSFHluHjs3OJ0l5S5+lOiHE9o/kwEIGk9u3TR TR+g== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=9EThvUedqwr9JLagw4SbqAFedU0AoJZ9CKdWwl7XKiA=; b=JsINNM1VxlJ+uA7qwS4jA8zbCrLIDDxa4oAznk7niGgcerBcBT+alvuqIBeWhee5GR smMO9JfIVvOx0Kp+k1kdEf1ueK//WslEyyEVxFi2hUwU/ENmjLzyLgwC0yKA6Xz6D2sA QmEqbKw9Ayjjwdrfmved/lws4g1STb5M32mO28TPjDlx/k4yMf5kqjjCRpyewT1JB3f0 VhRjrZQvcCNLlZzyk/QK/lfP2RYBVBicHR52cmYo8Np+4CeUIC5XsNNKahZFDvlEl+Z+ /QVwUYDfEvV2mAeNr04QHw+UL3HTPM6dViyl5ks/pA4gKFS1BEXHZyxH2n5/I1CZXNRR fIjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="Uu/7bonv"; 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 w6si53109437pfb.191.2019.01.08.11.24.37; Tue, 08 Jan 2019 11:24:52 -0800 (PST) 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=bombadil.20170209 header.b="Uu/7bonv"; 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 S1729264AbfAHStl (ORCPT + 99 others); Tue, 8 Jan 2019 13:49:41 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:50400 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727829AbfAHStl (ORCPT ); Tue, 8 Jan 2019 13:49:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding: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=9EThvUedqwr9JLagw4SbqAFedU0AoJZ9CKdWwl7XKiA=; b=Uu/7bonv5ZaHGzI6QLfILzH9B puh54QM8wm3H7+zKWLUgPsli0zU7U2sj4ZY8gDz+g1tyBdF4Xo6U6eBGsKezYjvqnhIBZKNtC228Z mjGzNwbI/ic4qkyDTUSUrAuciBBzKhhlVnTGc/zIxj0ggVaOxfZAC9/mj6UxvDOOEQiDr3Y2xFdlK snYv0/ZvaVrjGUtmfBj9ak+edbZ/9hi+/jApT37OBk9WJn5519c4gTVbS68ifn97QoyRIfmadth1K Q8Y71bcS4buqpXGjXg8wnzbUs5DiONR9amO94TYHZn8ZEPRLlJxCgRPR/W8Ia9sI5WEQTS2cfzNgX z2sT6TyHg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1ggwQw-0007W7-MF; Tue, 08 Jan 2019 18:49:02 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 1C99320289CC1; Tue, 8 Jan 2019 19:49:01 +0100 (CET) Date: Tue, 8 Jan 2019 19:49:01 +0100 From: Peter Zijlstra To: Boris Ostrovsky Cc: Andrew Murray , Ingo Molnar , Arnaldo Carvalho de Melo , Richard Henderson , Ivan Kokshaysky , Matt Turner , Will Deacon , Mark Rutland , Shawn Guo , Sascha Hauer , Benjamin Herrenschmidt , Paul Mackerras , Thomas Gleixner , Borislav Petkov , Russell King , suzuki.poulose@arm.com, robin.murphy@arm.com, Michael Ellerman , x86@kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-alpha@vger.kernel.org, jgross@suse.com Subject: Re: [PATCH v4 10/13] x86: perf/core: use PERF_PMU_CAP_NO_EXCLUDE for exclude incapable PMUs Message-ID: <20190108184901.GA1900@hirez.programming.kicks-ass.net> References: <1546878450-20341-1-git-send-email-andrew.murray@arm.com> <1546878450-20341-11-git-send-email-andrew.murray@arm.com> <20190108104841.GD6808@hirez.programming.kicks-ass.net> <7300f0af-b532-5546-a6f4-fec69cb91a0f@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7300f0af-b532-5546-a6f4-fec69cb91a0f@oracle.com> 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 Tue, Jan 08, 2019 at 11:36:33AM -0500, Boris Ostrovsky wrote: > On 1/8/19 5:48 AM, Peter Zijlstra wrote: > > On the various exclude options; they are as follows (IIUC): > > > > - exclude_guest: we're a HV/host-kernel and we don't want the counter > > to run when we run a guest context. > > > > - exclude_host: we're a HV/host-kernel and we don't want the counter > > to run when we run in host context. > > > > - exclude_hv: we're a guest and don't want the counter to run in HV > > context. > > > > Now, KVM always implies exclude_hv afaict (for guests), I'm not sure > > what, if anything Xen does on x86 (IIRC Brendan Gregg once said perf > > works on Xen) -- nor quite sure who to ask, Boris, Jeurgen? > > perf does work inside guests. > > VPMU is managed by the Xen and it presents to the guest only samples > that are associated with the guest. So from that perspective exclude_hv > doesn't seem to be needed. > > There is a VPMU mode that allows profiling whole system (host and > guests) from dom0, and this where exclude_hv might be useful. But this > mode, ahem, needs some work. Thanks Boris!