Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1210773rwb; Thu, 8 Dec 2022 07:59:22 -0800 (PST) X-Google-Smtp-Source: AA0mqf4jL7wyCFWcowAEkeDzDbJAySVn32sYE5H9EqhTlJkrmfna8CIOy3KFxcFeqqbZM4vecCTd X-Received: by 2002:a65:5541:0:b0:476:759b:7952 with SMTP id t1-20020a655541000000b00476759b7952mr69322930pgr.316.1670515162076; Thu, 08 Dec 2022 07:59:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670515162; cv=none; d=google.com; s=arc-20160816; b=tHelICY5P3oSoebYx389mONiJGmXHLcAYt0Sd3b4SfsFPj1+E2nKJuF1IsaoMeigjy zLJSbJgBvAyyjeVo55wdluUCYw/pRS0N490pmKu69YO3ptcxX0ktubMjaAYqdseHQ6JE wlv9iZTfR0Moe1toa7/2TB1cX3hu4j4lv4ZQecNYwor5uQq1tHDUw7/FjuIO2oSr6wv7 8GGB/MzES+NHFuctFRMVa6im7s1mHvU+G7gTDXWC82LA88LOMZEXZCbC+L1BAtVV88QH MR/K3UKYH87IjA7dxKThLUGiEW38K06KVoJ1tJK/T4X/GKjB+zWDAtZhWp8CMEJ3xH+y 7dkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=3GU5MeoEbeuS2CWF2tNDJu8X0AyDevMso/wvj1Ji+qA=; b=iqXLuSRTZ2Uzr5BjQLzapyj55tEjezqRpiHoYqOUM6zDo9rdDDfJEZUgkgNuhGHk3a QF/TvnqtDZ9ApBQSzt6x446eWVKqYgiYw5hdE5dGcWrWKXyVxVV/LmD0eTQQpB6yZCz9 UMDufXu99OGiF9fMtGvLRYqsoNG9MOF9RTibvvJhMkLNfPTrILmXGadLQybU1ZXdchDP OGp53230Lmzg4snC1CNaMH3P6UHg87H21uB5CdMt2D0RACPccYtHsc2GOqS+5HUgdZDn Dte8DFUq+9etJFm30gcv/DeT3hPRWoYULJBezLy+FVvTF4oESLqEgo3Ivv/sSXQLP9+U PRFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=NUsCzemu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t8-20020aa79388000000b00577c17000e1si1486090pfe.280.2022.12.08.07.58.47; Thu, 08 Dec 2022 07:59:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=NUsCzemu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230330AbiLHPVK (ORCPT + 72 others); Thu, 8 Dec 2022 10:21:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230283AbiLHPUv (ORCPT ); Thu, 8 Dec 2022 10:20:51 -0500 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A43D75BC4; Thu, 8 Dec 2022 07:19:45 -0800 (PST) Received: from zn.tnic (p200300ea9733e73d329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9733:e73d:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 54F181EC06FB; Thu, 8 Dec 2022 16:19:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1670512783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=3GU5MeoEbeuS2CWF2tNDJu8X0AyDevMso/wvj1Ji+qA=; b=NUsCzemugvmppmEdsoSK6otFrDka2N/KgWTUsMIzcOKX8/O2yCj11UviDU9BZajMWfNuOZ I+X/oo/Dn1IfADiurnMCSjSTBOGx8z1O6gf/1U0ej+B0F3/tqfxGGLr2JUu2Y2tDXnwMXf OptitUxT+Wn2xIHJ5ac9Pig8cPZKtvQ= Date: Thu, 8 Dec 2022 16:19:39 +0100 From: Borislav Petkov To: linux-kernel@vger.kernel.org, Linus Torvalds Cc: linux-tip-commits@vger.kernel.org, Ravi Bangoria , "Peter Zijlstra (Intel)" , Ian Rogers , x86@kernel.org Subject: Re: [tip: perf/core] perf/amd/ibs: Make IBS a core pmu Message-ID: References: <20221115093904.1799-1-ravi.bangoria@amd.com> <166929138346.4906.10749574210524260976.tip-bot2@tip-bot2> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <166929138346.4906.10749574210524260976.tip-bot2@tip-bot2> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I believe this is one of the things Linus wanted to have on AMD hw. On Thu, Nov 24, 2022 at 12:03:03PM -0000, tip-bot2 for Ravi Bangoria wrote: > The following commit has been merged into the perf/core branch of tip: > > Commit-ID: 30093056f7b2f759ff180d3a86d29f68315e469b > Gitweb: https://git.kernel.org/tip/30093056f7b2f759ff180d3a86d29f68315e469b > Author: Ravi Bangoria > AuthorDate: Tue, 15 Nov 2022 15:09:04 +05:30 > Committer: Peter Zijlstra > CommitterDate: Thu, 24 Nov 2022 11:09:19 +01:00 > > perf/amd/ibs: Make IBS a core pmu > > So far, only one pmu was allowed to be registered as core pmu and thus > IBS pmus were being registered as uncore. However, with the event context > rewrite, that limitation no longer exists and thus IBS pmus can also be > registered as core pmu. This makes IBS much more usable, for ex, user > will be able to do per-process precise monitoring on AMD: > > Before patch: > $ sudo perf record -e cycles:pp ls > Error: > Invalid event (cycles:pp) in per-thread mode, enable system wide with '-a' > > After patch: > $ sudo perf record -e cycles:pp ls > [ perf record: Woken up 1 times to write data ] > [ perf record: Captured and wrote 0.017 MB perf.data (33 samples) ] > > Signed-off-by: Ravi Bangoria > Signed-off-by: Peter Zijlstra (Intel) > Acked-by: Ian Rogers > Link: https://lkml.kernel.org/r/20221115093904.1799-1-ravi.bangoria@amd.com > --- > arch/x86/events/amd/ibs.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/events/amd/ibs.c b/arch/x86/events/amd/ibs.c > index 3271735..fbc2ce8 100644 > --- a/arch/x86/events/amd/ibs.c > +++ b/arch/x86/events/amd/ibs.c > @@ -631,7 +631,7 @@ static const struct attribute_group *op_attr_update[] = { > > static struct perf_ibs perf_ibs_fetch = { > .pmu = { > - .task_ctx_nr = perf_invalid_context, > + .task_ctx_nr = perf_hw_context, > > .event_init = perf_ibs_init, > .add = perf_ibs_add, > @@ -655,7 +655,7 @@ static struct perf_ibs perf_ibs_fetch = { > > static struct perf_ibs perf_ibs_op = { > .pmu = { > - .task_ctx_nr = perf_invalid_context, > + .task_ctx_nr = perf_hw_context, > > .event_init = perf_ibs_init, > .add = perf_ibs_add, -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette