Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6288393rwd; Mon, 19 Jun 2023 05:20:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5AqmZbGZG6RmVwxOvZiMWvshTrnagpJuJfiGr88M38HIOd9FpzyghNDudKwZJWw90RwevY X-Received: by 2002:a17:90a:2b88:b0:25b:eba8:15d6 with SMTP id u8-20020a17090a2b8800b0025beba815d6mr4480398pjd.39.1687177242510; Mon, 19 Jun 2023 05:20:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1687177242; cv=pass; d=google.com; s=arc-20160816; b=rHpTd25YdKe8GyNKaQFebcE/Bcb9djGdYucj/CAicxdlxb00nxV2Q1eDf47BdxKqry 14MPhl0B+3jKyEmTA0T1LZDI5UcA6nFDad4DSe+r0ltWIBRo/6N8CyrslH78NZRu1BGr wnC0ohCB+bunS/uWmbJihCqwA3gXI6mCe8gni69cWmrzWAnYcUWvqg/qajgqgNB2fgcx XgYmVfe4GJ2KN2jNsaP+iaP4ltK7JYs6cbI/kOPjwu0m5S4OLuY9BXCV0MaqLZziMAz7 MZDD1qbt2GWuc/Muts6c9tUkMYrtPXA8frNgpJs9lfrIt7ArI7exswjKZP2lAtaxqrB5 P2Lw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:content-language:references:cc:to:subject :user-agent:date:message-id:dkim-signature; bh=af1ghpKobEtHqKNjBUQDFwlRyMUyJVKVL21ySo1vaHo=; b=s8c1VfWVjphOfAUcqhxZmhq0wYz7hZLq1bYfKogvXPQpKDnaJcOGKQ401XoYlDi9LH cbaaFNZt0L9bvpnrlvEcWeBJc10udTJs02hM4NU4ble2jvAG5UMfG+Tq7mseE91Xj9fG TZUKT8RSbS1knkEOpUmGP32IvyS4ObGYpJCo9CqdLuKl5uU2bkCSSo6xL/RiTXmsy91R IGb01IV6cMC1QXGBtV+jVgmkVfpH8A+WzQ8O/xjQTj1HXGqZ3nZEPzYiG9Yxxv8jF24U Ghlh0A3yu2/QH8NzGHJYx0/oViOGvkA+t5rno120xxa3kBW5uLmTWgUo7QyippVOJH4g T4iw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=VqpprNLq; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z8-20020a637e08000000b0054f9f9b333csi13634878pgc.686.2023.06.19.05.20.27; Mon, 19 Jun 2023 05:20:42 -0700 (PDT) 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=@amd.com header.s=selector1 header.b=VqpprNLq; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229735AbjFSLqq (ORCPT + 99 others); Mon, 19 Jun 2023 07:46:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229702AbjFSLqo (ORCPT ); Mon, 19 Jun 2023 07:46:44 -0400 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A3EE137; Mon, 19 Jun 2023 04:46:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MXN2Hxgx/LItOPexyNj74fs+V4y+GBRlwcKOSjNEOkk9jP94XhWCr5CLd2Wz8jBlYfx1X6bu/8tkgXI0bebXAjMLYdaCMnV8GtNQGJWWx2Sw+60HZQcmnLQLj+EPa+msjiSfzrP1fQCCtTueScUQbi8X6TxH6EmqYyK2A7SfWlYsL46GOdXgOjsd33+EsASeZR4ZZ/j7yiALM9U87ceMr3Q973hSEOZMXQe84jvUWAD+D7aVGJ39mDUvIx/GD81eqt3ndCNiYjvGk+Y1Y6viiWzF3HIlWByav3jSmn5ADq11ZGzGazZD3jG9ORwiTlgLmfpuRqeCbhq+DzkwYWD9nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=af1ghpKobEtHqKNjBUQDFwlRyMUyJVKVL21ySo1vaHo=; b=Cf+PwtEwKK0LL847QB30tkiRu9qxT1jB6BYw3cHWspRTkR4IKLxmpgERE0NmSqNfIUmUy6WhsEQD3rywYy6p/GV0XiSuMdMzL+qxpzbOQdc4epEKniiwUA2fjFiIKKs6UfZ2NNXLk11s9Y1GmdVO6nyb4jzTMW45HRGYq02LV70N3jfS2yz4faFY0Nf2F4Dd76ka4ZWoCQYp1HWSpfxoP9SmlSNaeYsI5DvbIP8BnQoW126CDXs2HHK+GqzT0EinY6brfUsshOD0UZ+WrVxOd4qyRgE0fHqBnTZD5c+0bPOJpXqMc6S5qZ9p//31V94SfzvbI5ImHi9mEYTZKO4VFQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=af1ghpKobEtHqKNjBUQDFwlRyMUyJVKVL21ySo1vaHo=; b=VqpprNLqC3qu0Ue2aHLq2YP32uaBC/ZPHjl2sPCtI1HqqQD+LbLkzyI7gMEMf3qxkbmPsQactZ/rpAm0JSMoeYP8zjlC+b/JDL7cnhvSEZGEZtbMthGvj1e1XTjDQlsfw+5tlqjPSlPtYyEZBclOR6V3NjV8yJm4HhdVnkGbiD8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from PH7PR12MB5712.namprd12.prod.outlook.com (2603:10b6:510:1e3::13) by IA1PR12MB6308.namprd12.prod.outlook.com (2603:10b6:208:3e4::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.36; Mon, 19 Jun 2023 11:46:39 +0000 Received: from PH7PR12MB5712.namprd12.prod.outlook.com ([fe80::9c4d:b56:ce20:d723]) by PH7PR12MB5712.namprd12.prod.outlook.com ([fe80::9c4d:b56:ce20:d723%7]) with mapi id 15.20.6500.036; Mon, 19 Jun 2023 11:46:38 +0000 Message-ID: <268afbc2-4e65-0f31-a023-aff4823dd8e8@amd.com> Date: Mon, 19 Jun 2023 17:16:27 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH] perf test: Retry without grouping for all metrics test To: Ian Rogers Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, peterz@infradead.org, mingo@redhat.com, acme@kernel.org, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@kernel.org, namhyung@kernel.org, adrian.hunter@intel.com, kjain@linux.ibm.com, atrajeev@linux.vnet.ibm.com, barnali@linux.ibm.com, ayush.jain3@amd.com, ananth.narayan@amd.com, ravi.bangoria@amd.com, santosh.shukla@amd.com References: <20230614090710.680330-1-sandipan.das@amd.com> Content-Language: en-US From: Sandipan Das In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SI2PR02CA0032.apcprd02.prod.outlook.com (2603:1096:4:195::12) To PH7PR12MB5712.namprd12.prod.outlook.com (2603:10b6:510:1e3::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH7PR12MB5712:EE_|IA1PR12MB6308:EE_ X-MS-Office365-Filtering-Correlation-Id: d92db463-b5af-4f11-afe0-08db70bad774 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: M8FdJqhvbTMDcf9YSiD9QJ4FWfyIOIZcwJr7tLFqn1p2r8KOAxwDSi6PKor6hZ5cinVqfeO+cmx2+DO0myOR/zlULM6qwaM6pzqN7zUZNnkZeoM41mVq5/HX5AeCEas2TNko/xtf0r9xgqg8wNXEAjQ+NqUyzBCHyN89zG2Vom8KXJRtfs6vhfzrqwVhULCMCyAeIw+6o1ny02qMqXmHT4QC22yvznGhXKnCB7oTmUSZZWHHTt1MgiiLkHQLXgXgnCPPIQCIUNZs2SAprqPgRJzW2tjCl21+8bVp3AJ3JNzaoAEqUWWbgS3z4rO78HEbmc+no999VVC3PpIk7Kk2v/26HjsUZiHgn0DJqhJnHIeU6czWGQqxlTuvvMMvEeQ53XiYJpMLboKQ37TtHVLgP5J4PNVMu3LHhHzdoApU3hnJKT9YsPLd+NwoBiBRi4USr5sgDK8z4DLvbDoO3+OjgWbZemUio4P1I6ea7B8iWF/GnaJ6mSvidDq8c2+6b7sFiXIv4Tz4USx+fy72cMVqloCQVQMFkZKLc27d8Zalqm3AYjDVqr6Lxba20VplaR75/Wu+4R5N79C0TaJKeTjyUJ7cojvdwtWgon4NcU6ShODZDE75CsgNNobU5Nh0ffNEiPAQszGo6mzy1FRd8cDsgA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH7PR12MB5712.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(376002)(136003)(366004)(39860400002)(396003)(346002)(451199021)(7416002)(44832011)(31696002)(86362001)(41300700001)(8676002)(8936002)(5660300002)(66556008)(66476007)(66946007)(316002)(6916009)(31686004)(2616005)(38100700002)(83380400001)(186003)(36756003)(26005)(6512007)(6486002)(6666004)(6506007)(53546011)(4326008)(478600001)(2906002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?NFJnTnNVbUQzZXBnSkh6NlNkRTFvTUNCb2ZTa0MxZGNXK3BRc2paemEwUGJu?= =?utf-8?B?bm83VXg5TlEyRk5sNWhNN00ybFprQXZHc2IyQ1grM1k0MDBGWHhFRGZZY3B1?= =?utf-8?B?MWFKMm0wbjNNWGM3ZDRhTnFTQlNuQjVVdkNKU3E5bjB3a2ZwTG94QVR2aHMy?= =?utf-8?B?cmNhR2lGRmR0NXJYZFEwR0thYWJxNkd4RXJqSldKcE5DNXg4TEpTd0tOOGJv?= =?utf-8?B?QytiZ2svQWt2czNYV2Z1K3IzaGVyWlRHOXJUUFBzc3hWVyt4S2dXaW1KZ2pi?= =?utf-8?B?dkR0NGJBc2syOXcwSzlxUFlqQTlVNmJxL29jL21vRGFBbHNhMTBTY1lvMGJh?= =?utf-8?B?NUdoMEFneU92UExYb2VIeFJwSWpPTzQ4c2hVaEJhYjRaK1RldXU2WUFpZ3VI?= =?utf-8?B?K2NaWmwvNTBEM2ZtUW5mMTlUVEdGNVg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R12MB5712.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2023 11:46:38.7217 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: uy6MH++ExzddBiQ2xghw12amSkeTOdYc0dbMbmtdjhHRfkNDjOU6Jbx3npURkEDA03cRdxxbVLHLjo+4jM+Q6w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6308 X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no 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 Hi Ian, On 6/14/2023 10:10 PM, Ian Rogers wrote: > On Wed, Jun 14, 2023 at 2:07 AM Sandipan Das wrote: >> >> There are cases where a metric uses more events than the number of >> counters. E.g. AMD Zen, Zen 2 and Zen 3 processors have four data fabric >> counters but the "nps1_die_to_dram" metric has eight events. By default, >> the constituent events are placed in a group. Since the events cannot be >> scheduled at the same time, the metric is not computed. The all metrics >> test also fails because of this. > > Thanks Sandipan. So this is exposing a bug in the AMD data fabric PMU > driver. When the events are added the driver should create a fake PMU, > check that adding the group is valid and if not fail. The failure is > picked up by the tool and it will remove the group. > > I appreciate the need for a time machine to make such a fix work. To > workaround the issue with the metrics add: > "MetricConstraint": "NO_GROUP_EVENTS", > to each metric in the json. > Thanks for the suggestions. The amd_uncore driver is indeed missing group validation checks during event init. Will send out a fix with the "NO_GROUP_EVENTS" workaround. >> Before announcing failure, the test can try multiple options for each >> available metric. After system-wide mode fails, retry once again with >> the "--metric-no-group" option. >> >> E.g. >> >> $ sudo perf test -v 100 >> >> Before: >> >> 100: perf all metrics test : >> --- start --- >> test child forked, pid 672731 >> Testing branch_misprediction_ratio >> Testing all_remote_links_outbound >> Testing nps1_die_to_dram >> Metric 'nps1_die_to_dram' not printed in: >> Error: >> Invalid event (dram_channel_data_controller_4) in per-thread mode, enable system wide with '-a'. > > This error doesn't relate to grouping, so I'm confused about having it > in the commit message, aside from the test failure. > Agreed. That's the error message from the last attempt where the test tries to use a longer running workload (perf bench). - Sandipan