From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7956C43463 for ; Fri, 18 Sep 2020 10:56:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 65A3B21973 for ; Fri, 18 Sep 2020 10:56:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600426561; bh=7sSABL4QXD65HEVDA8nFrm0LnOHh9FEw+n+ZJ1+kPFc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=mv1lBQJ0rBNL67Y1LwbIFQZQ1lxKcny3PqoZ83uANoVMF6TNCoWgeQrwXcNJWvsAm FghEMl/UOf4zkp1W3sl4gaf8HgbTVyXkqBYvcv013h/iouWXYkDmWt8/V00zv6vSn6 ObJYGbp7MshfsYMzQxkA7oT7gojpZmoxXeS75Pxc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726234AbgIRK4A (ORCPT ); Fri, 18 Sep 2020 06:56:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:43766 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725941AbgIRK4A (ORCPT ); Fri, 18 Sep 2020 06:56:00 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CB64920789; Fri, 18 Sep 2020 10:55:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600426559; bh=7sSABL4QXD65HEVDA8nFrm0LnOHh9FEw+n+ZJ1+kPFc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=sRDOp1/9yOLNEi29b+JJcJ52Q7jUzVPZLjpNib2KO5E87TJFMrinc8UwjMYA8OGF3 4v4Z7LLlMsoMjrsX/BQs/Q6Bk/Bpkp9OlvSxdyd4hiYNeeDkJN/eu9MqVrMpWhAMIz rsBjnKK9ePgyU+CCes9trR0VMpClnv4maQsh9sMo= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kJE3Y-00CyDX-UZ; Fri, 18 Sep 2020 11:55:57 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 18 Sep 2020 11:55:56 +0100 From: Marc Zyngier To: Sergey Senozhatsky Cc: Leo Yan , Arnaldo Carvalho de Melo , Mark Rutland , Peter Zijlstra , Will Deacon , John Garry , Mathieu Poirier , Namhyung Kim , Suleiman Souhlal , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCHv3] perf kvm: add kvm-stat for arm64 In-Reply-To: <20200918103521.GE3049@jagdpanzerIV.localdomain> References: <20200917003645.689665-1-sergey.senozhatsky@gmail.com> <20200917100950.GC12548@leoy-ThinkPad-X240s> <20200917101219.GD12548@leoy-ThinkPad-X240s> <652f10660f09bd608b825233713f775a@kernel.org> <20200917114231.GE12548@leoy-ThinkPad-X240s> <20200918003219.GC3049@jagdpanzerIV.localdomain> <20200918103521.GE3049@jagdpanzerIV.localdomain> User-Agent: Roundcube Webmail/1.4.8 Message-ID: <06c3e5d907d1145bf3a7a03de63170ae@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: sergey.senozhatsky@gmail.com, leo.yan@linaro.org, acme@kernel.org, mark.rutland@arm.com, peterz@infradead.org, will@kernel.org, john.garry@huawei.com, mathieu.poirier@linaro.org, namhyung@kernel.org, suleiman@google.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-09-18 11:35, Sergey Senozhatsky wrote: > On (20/09/18 09:20), Marc Zyngier wrote: >> On 2020-09-18 01:32, Sergey Senozhatsky wrote: >> > On (20/09/17 12:53), Marc Zyngier wrote: >> > > Feel free to add a *new* tracepoint instead. >> > >> > Wouldn't we want a whole bunch of new tracepoints in this case? >> >> Yes. I don't have a better solution as long as tracepoints are ABI. > > Well, no one does. > >> Get someone to sign-off on it, and I'll happily change them. > > Sorry, I'm not sure I understand this sentence. What I meant is that the only way to make changes to existing tracepoints would be to get someone like Linus to approve them. It's all rhetorical anyway, so let's move on. > >> > (almost all of the existing ones with the extra vcpu_id field). >> > Right now we have 3 types of events: >> > - events with no vcpu at all // nil >> > - events with vcpu_pc // "0x%016lx", __entry->vcpu_pc >> > - events with (void *)vcpu // "vcpu: %p", __entry->vcpu >> > >> > It might be helpful if we could filter out events by vcpu_id. >> > But this, basically, doubles the number of events in the ringbuffer. >> >> Only if you enable them both, right? > [..] >> How would that double the number of events in the buffer? > > Yes. I assume that many scripts do something like "capture kvm:* > events", > so new and old events are enabled. Unless we want to keep new events in > something like kvm2:* namespace (which is unlikely to happen, I guess). I really don't mind. I actually like the namespacing, as it gives us a notion of versioning, something tracepoints lack.. And it gives an opportunity to argue about the name of the namespace. > > And `sudo ./perf stat -e 'kvm:*'` is not unseen. In fact, this is > literally the first thing mentioned at > https://www.linux-kvm.org/page/Perf_events > > So if we'll have something like > > trace_kvm_foo(vcpu); > + trace_kvm_foo2(vcpu->id, vcpu); > > for all arm64 kvm events, then we double the number of arm64 kvm:* > events > in the ringbuffer, don't we? Maybe this is not a gigantic issue, but > who > knows. I don't think it's a problem, but I'm more in favour of the namespace approach. M. -- Jazz is not dead. It just smells funny... From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 746C4C43463 for ; Fri, 18 Sep 2020 10:57:25 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1DD1820789 for ; Fri, 18 Sep 2020 10:57:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="DuukZhxC"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="sRDOp1/9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1DD1820789 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:To:From: Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wk37FpH42BvBl9l9Gq2PmBWufc6JzeOqyNnRvg4wcqI=; b=DuukZhxCcqhwxp/VETCHT2B6n KOmTiB9rCMfje/rQT+YK73YmybcQ6ycU1q/NmrVFTKIyrQK7inHooHeHVZQ1lM6YkkWDz0KO+yWRM beVTpCtroIYpAvcEKzf0TbsoV9SG7wtkHu02lt3lTuTDiKFvcd7c1se2UrIpJ7Y6pwZp2pd/yNyFP eqstn3oLMVEAsii7i0kViE6fSBBqh6SI/NENNpO2dOQGew8soPRelR8k2CZ2Z9XFLwSPvyMCYsXmX lkfN3/e7DNpKoOLDBzGy8GmOcl18m7kehvCk6QamYOefXQ1H68f7kVEQ002kmZjBMluse+hFlwAsI likAU9Haw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJE3f-0007pI-D9; Fri, 18 Sep 2020 10:56:03 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJE3c-0007oW-3G for linux-arm-kernel@lists.infradead.org; Fri, 18 Sep 2020 10:56:01 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CB64920789; Fri, 18 Sep 2020 10:55:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600426559; bh=7sSABL4QXD65HEVDA8nFrm0LnOHh9FEw+n+ZJ1+kPFc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=sRDOp1/9yOLNEi29b+JJcJ52Q7jUzVPZLjpNib2KO5E87TJFMrinc8UwjMYA8OGF3 4v4Z7LLlMsoMjrsX/BQs/Q6Bk/Bpkp9OlvSxdyd4hiYNeeDkJN/eu9MqVrMpWhAMIz rsBjnKK9ePgyU+CCes9trR0VMpClnv4maQsh9sMo= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kJE3Y-00CyDX-UZ; Fri, 18 Sep 2020 11:55:57 +0100 MIME-Version: 1.0 Date: Fri, 18 Sep 2020 11:55:56 +0100 From: Marc Zyngier To: Sergey Senozhatsky Subject: Re: [PATCHv3] perf kvm: add kvm-stat for arm64 In-Reply-To: <20200918103521.GE3049@jagdpanzerIV.localdomain> References: <20200917003645.689665-1-sergey.senozhatsky@gmail.com> <20200917100950.GC12548@leoy-ThinkPad-X240s> <20200917101219.GD12548@leoy-ThinkPad-X240s> <652f10660f09bd608b825233713f775a@kernel.org> <20200917114231.GE12548@leoy-ThinkPad-X240s> <20200918003219.GC3049@jagdpanzerIV.localdomain> <20200918103521.GE3049@jagdpanzerIV.localdomain> User-Agent: Roundcube Webmail/1.4.8 Message-ID: <06c3e5d907d1145bf3a7a03de63170ae@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: sergey.senozhatsky@gmail.com, leo.yan@linaro.org, acme@kernel.org, mark.rutland@arm.com, peterz@infradead.org, will@kernel.org, john.garry@huawei.com, mathieu.poirier@linaro.org, namhyung@kernel.org, suleiman@google.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200918_065600_489826_0985FD61 X-CRM114-Status: GOOD ( 25.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Mathieu Poirier , Peter Zijlstra , John Garry , linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo , Suleiman Souhlal , Leo Yan , Namhyung Kim , Will Deacon , linux-arm-kernel@lists.infradead.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2020-09-18 11:35, Sergey Senozhatsky wrote: > On (20/09/18 09:20), Marc Zyngier wrote: >> On 2020-09-18 01:32, Sergey Senozhatsky wrote: >> > On (20/09/17 12:53), Marc Zyngier wrote: >> > > Feel free to add a *new* tracepoint instead. >> > >> > Wouldn't we want a whole bunch of new tracepoints in this case? >> >> Yes. I don't have a better solution as long as tracepoints are ABI. > > Well, no one does. > >> Get someone to sign-off on it, and I'll happily change them. > > Sorry, I'm not sure I understand this sentence. What I meant is that the only way to make changes to existing tracepoints would be to get someone like Linus to approve them. It's all rhetorical anyway, so let's move on. > >> > (almost all of the existing ones with the extra vcpu_id field). >> > Right now we have 3 types of events: >> > - events with no vcpu at all // nil >> > - events with vcpu_pc // "0x%016lx", __entry->vcpu_pc >> > - events with (void *)vcpu // "vcpu: %p", __entry->vcpu >> > >> > It might be helpful if we could filter out events by vcpu_id. >> > But this, basically, doubles the number of events in the ringbuffer. >> >> Only if you enable them both, right? > [..] >> How would that double the number of events in the buffer? > > Yes. I assume that many scripts do something like "capture kvm:* > events", > so new and old events are enabled. Unless we want to keep new events in > something like kvm2:* namespace (which is unlikely to happen, I guess). I really don't mind. I actually like the namespacing, as it gives us a notion of versioning, something tracepoints lack.. And it gives an opportunity to argue about the name of the namespace. > > And `sudo ./perf stat -e 'kvm:*'` is not unseen. In fact, this is > literally the first thing mentioned at > https://www.linux-kvm.org/page/Perf_events > > So if we'll have something like > > trace_kvm_foo(vcpu); > + trace_kvm_foo2(vcpu->id, vcpu); > > for all arm64 kvm events, then we double the number of arm64 kvm:* > events > in the ringbuffer, don't we? Maybe this is not a gigantic issue, but > who > knows. I don't think it's a problem, but I'm more in favour of the namespace approach. M. -- Jazz is not dead. It just smells funny... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel