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=-3.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,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 F0FA7C43463 for ; Fri, 18 Sep 2020 10:35:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9AA2720771 for ; Fri, 18 Sep 2020 10:35:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pLoy5C3S" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726276AbgIRKfY (ORCPT ); Fri, 18 Sep 2020 06:35:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725955AbgIRKfY (ORCPT ); Fri, 18 Sep 2020 06:35:24 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 170DCC06174A for ; Fri, 18 Sep 2020 03:35:24 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id k14so3218264pgi.9 for ; Fri, 18 Sep 2020 03:35:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=RqoAg1y2XJE1pFIbTt3E45OwWJcrNJ7ET1lzszenztA=; b=pLoy5C3SRHQvO5NIp9UEoCT2SMIgggujADGmgj9gYlGv8cEVq3TP3o0+Mss1DMwieg Mi6ngkCS3PhqQOHAMfdiZ+7EjwZVFL4XGUisiGUeJn63+wWvWVaeFEiXuroAWCoCq+Y3 rhy8QrMfp610bpsB0ENJCT90q9MyUDPCbgjkfR2BxmOORujEOKWoUnjln2Fx88CfVJpE KGhmxNMtjxJeUtHvg5TsHT6e9oqYN0V9D8GbHM2UxMjm/eCa0yrS/p0tjTn+6pFPK8vH 4b3Da4HNwV5ErsGKR/J3C8pznSAZPYj+qGKCe46eDbqSsA0xSx6yDn1CP01efj2gU3zZ Y1Hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=RqoAg1y2XJE1pFIbTt3E45OwWJcrNJ7ET1lzszenztA=; b=VRfnSD6vBg/roPR08i9I6KhtDRzwgr6pNW1tmcyIEBDNjDdLU5nHWYXXs9sev1ZNYe h9AKxnlxFQhIbM3//eQErG+KZfPBDSZBuDidG3as3NSJ2zAOmaMsFU43I7xO7MKy4nQc 1wbbk6nYfr4z02xWY5+GOQBj2egXK3R03rx0ArgNj9zhpQBrPHN+0g77jxw4RaVs4eDV aR2ijhsyh84T3JiGMxoVWw+/owX2VlstkkH+TNX2KEKalf76t2zNVLxO+XHJfVuv4V0G HNL7dWDuR61C08tUCkbd0ldWA9rnXxcrgMnviAzq9Qq7BB9YQVgc8NN9PtXjYCMtEJqd bsLA== X-Gm-Message-State: AOAM5315BR0728f6vIh7Rwr5EKvcfqP06rf50bpqiNQ1wAH+AO9JiDrQ bMt8J4hkbM7xFCJ1mk0yZm0= X-Google-Smtp-Source: ABdhPJwZ1SuDZiux9y0FN9/TViASeCp9ftZFPp+ILwCxrKkVnoUT2VtcGCDOOJ4NYMgUZbXIDGF8PA== X-Received: by 2002:a63:f104:: with SMTP id f4mr27363203pgi.365.1600425323501; Fri, 18 Sep 2020 03:35:23 -0700 (PDT) Received: from localhost ([2409:10:2e40:5100:6e29:95ff:fe2d:8f34]) by smtp.gmail.com with ESMTPSA id r5sm2513402pgk.34.2020.09.18.03.35.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Sep 2020 03:35:22 -0700 (PDT) Date: Fri, 18 Sep 2020 19:35:21 +0900 From: Sergey Senozhatsky To: Marc Zyngier Cc: Sergey Senozhatsky , 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 Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > > (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). 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. -ss 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=-3.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,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 65C56C43464 for ; Fri, 18 Sep 2020 10:37:00 +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 0786821D24 for ; Fri, 18 Sep 2020 10:37:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="cno4ojua"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pLoy5C3S" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0786821D24 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com 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-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=vR+4nODb2ra0LzBUxeoxPAUslHWgknzU/Pt1l3PMwiY=; b=cno4ojualocC3hKV/HEIiQtqD Jq2hGzftpXU/XukSIOYXVUS+1uunM9uSNJhC9LDRvi9nrF0bZ7xhYZ9hPviFlv3gVyuc38WOwfO7Q J4HEN7Repq7T84TAskfgufOkunBbz39hMUwjyADb7pNJEqMRsytWJGEsdMJo4uMXdVEHE+erhujAh ILJjE7OXLQ5aIiIzgpbiZj/NqiUxf/OeKzj9xzAzNf8AEdo+1EX5wHyNd6Mi43DcU3qoGdRbRyz/5 mXAV0QOt5IX8UUwXyCF/Q9o9ARRc2WvqDoAjKKsyNhO2MA/w/zqFZdf4JRu8q0gg098xtijXWbchf 3SAr7w2Nw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJDjs-0002W8-WB; Fri, 18 Sep 2020 10:35:37 +0000 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJDjj-0002RH-Ha for linux-arm-kernel@lists.infradead.org; Fri, 18 Sep 2020 10:35:33 +0000 Received: by mail-pg1-x544.google.com with SMTP id s65so3239290pgb.0 for ; Fri, 18 Sep 2020 03:35:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=RqoAg1y2XJE1pFIbTt3E45OwWJcrNJ7ET1lzszenztA=; b=pLoy5C3SRHQvO5NIp9UEoCT2SMIgggujADGmgj9gYlGv8cEVq3TP3o0+Mss1DMwieg Mi6ngkCS3PhqQOHAMfdiZ+7EjwZVFL4XGUisiGUeJn63+wWvWVaeFEiXuroAWCoCq+Y3 rhy8QrMfp610bpsB0ENJCT90q9MyUDPCbgjkfR2BxmOORujEOKWoUnjln2Fx88CfVJpE KGhmxNMtjxJeUtHvg5TsHT6e9oqYN0V9D8GbHM2UxMjm/eCa0yrS/p0tjTn+6pFPK8vH 4b3Da4HNwV5ErsGKR/J3C8pznSAZPYj+qGKCe46eDbqSsA0xSx6yDn1CP01efj2gU3zZ Y1Hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=RqoAg1y2XJE1pFIbTt3E45OwWJcrNJ7ET1lzszenztA=; b=ivgNOmDlb/kMNMS4CLcLdu8+CzhAj7wTAx9iSegBypcvNBgedgmEWY6Qx+7Id3qARf SZYkOe8m7/9bXBwvuH08qh1KZLHcC9/o397N6uzyzreHSZz9azAiXEu2lfsicR7z/PG6 9HPgL3LjmzoI05eOM4082010s4+2IpYmzcV4QP3rbMP8M6eK0+GX10R/wN2Dc/DliEAt neOJ64r1AjpRZpb3pAXCpnGjgt76yRwoHnSr4qi0KSmWb9AuhlyPxpcfYZrE92n5mAz4 +PDk4zaR/yDERJJqWFtvVeGpeu96furpHjMs4jz5WtYjGlUw/taEP2cEULbWWnvBKcza XMNQ== X-Gm-Message-State: AOAM530Dr0/z/lNy21XnJavIkaS7AcYD+u8C07eWPyVCzUP7zDlpzmim 8jpcGRs4QgxBUHuZ13Vb4pQ= X-Google-Smtp-Source: ABdhPJwZ1SuDZiux9y0FN9/TViASeCp9ftZFPp+ILwCxrKkVnoUT2VtcGCDOOJ4NYMgUZbXIDGF8PA== X-Received: by 2002:a63:f104:: with SMTP id f4mr27363203pgi.365.1600425323501; Fri, 18 Sep 2020 03:35:23 -0700 (PDT) Received: from localhost ([2409:10:2e40:5100:6e29:95ff:fe2d:8f34]) by smtp.gmail.com with ESMTPSA id r5sm2513402pgk.34.2020.09.18.03.35.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Sep 2020 03:35:22 -0700 (PDT) Date: Fri, 18 Sep 2020 19:35:21 +0900 From: Sergey Senozhatsky To: Marc Zyngier Subject: Re: [PATCHv3] perf kvm: add kvm-stat for arm64 Message-ID: <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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200918_063527_607249_E397C1AC X-CRM114-Status: GOOD ( 18.31 ) 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 , Suleiman Souhlal , Mathieu Poirier , Peter Zijlstra , John Garry , linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo , Sergey Senozhatsky , Leo Yan , Namhyung Kim , Will Deacon , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. > > (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). 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. -ss _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel