Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp646521pxf; Thu, 8 Apr 2021 10:02:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4iP9j/1sC+JkkMjISXcXLQrB8n0MLVPtytVydsQBQpZsIAEkBXUO0gfbVp0ptdJvpd4dx X-Received: by 2002:a17:906:2b03:: with SMTP id a3mr3090475ejg.481.1617901355896; Thu, 08 Apr 2021 10:02:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617901355; cv=none; d=google.com; s=arc-20160816; b=zsOoO9jTj8if9/1eToWHjujeyw+WqsTCxL7bUuXM8yZKQdf460eo3ozJa+EFi0QlTN kOgXcRW2o2uyHYrqVcFml4O69AJLuxMLIVbgrdmIEp0hdYrNcwopKaSFxL7+YXThmiHH c5blEMvusDuUcjCS02BQqnOsZg9OSTZhhi+Y78BdbzpZT5vZf4tAXBtWcl3y54+x5cio qe0O9etnCB4weJQNIzX8dSAKO2lN2iPFy+4550XHb/0w7V6ktqMN6l6y0sZC0sLpuUm4 QdKFe/2dtcPR3dsmIS97ICXdu1kXte2HUHA8738MQcBLfAl3Fxtk1KxxVuPpNMerlQiD x4aA== 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=Wd8921wFrgD6hVwNv+IXa152B3WodbiJoLO9VaviUIY=; b=kKxB1UPn8JlAB8QizKdJGcpGXtnWWYPwFvrjLAsLKkyeO1Qa9JEWXvyiuv4JEj/mv0 WoUQtIDLJ0mUYS4TkDP52MWhS1SwS+nVWMYze0rKaOs4/2QXUQAWteuBEEaYGXS/3Re6 BLrAm7AGDo88tLu/VoN9pFDhq2kqI4sY/7ousMbG80aUfskNjADgHQjnPYdfnnt67oh8 hSJ2VHlu+g1ZOqE/Yr3sSN9o7nGixjstT1rwO+YB1qCf+CmUqjlvqLPSuutadT2a9e9R 5kvButAjw4an17aVONFQuPkeIn+/06+4Lle4msgy2cnscf7odaYCZZEiBLWC4b+QHbEX YdfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ZaxUsJwp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id zp16si10873757ejb.704.2021.04.08.10.02.11; Thu, 08 Apr 2021 10:02:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ZaxUsJwp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231676AbhDHRB2 (ORCPT + 99 others); Thu, 8 Apr 2021 13:01:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230522AbhDHRB2 (ORCPT ); Thu, 8 Apr 2021 13:01:28 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EF75C061760 for ; Thu, 8 Apr 2021 10:01:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=Wd8921wFrgD6hVwNv+IXa152B3WodbiJoLO9VaviUIY=; b=ZaxUsJwpuQAvW/5cs0lVLMeLsk 7w11tth6JRz0O9ZDFtrjMAcqcVQILIyjRLGYQj90BeyQbZ6HvDrpHUIKY9LKXvUw8ns2yA7/vjSGc mUGjeiO/Eo4nMt98UH5/PaE5pTRAJku+ME4TL0BiEDWaYereV9pdHYwfCo4Y/n1qjFkvVSaP/VCsw 4ebLgvLlRmdSn+vYUTi6sfjbWiXX0dLiWrAy4G9DGX1SIx3m11pREp99yHc2jhXGmtVTx6/XSNStP 5EZVGVlGC4rqGKrbahv50I1Q4vNIj6LZoPjY6YWu0Cp4Atkl+hZqVXeJRKj9I5YMItqui+/yFJ2ft 4B9mOfCQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lUY1C-00GYtn-Av; Thu, 08 Apr 2021 17:00:42 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id DEBAA3000CC; Thu, 8 Apr 2021 19:00:33 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id C29842BD0DAEF; Thu, 8 Apr 2021 19:00:33 +0200 (CEST) Date: Thu, 8 Apr 2021 19:00:33 +0200 From: Peter Zijlstra To: kan.liang@linux.intel.com Cc: mingo@kernel.org, linux-kernel@vger.kernel.org, acme@kernel.org, tglx@linutronix.de, bp@alien8.de, namhyung@kernel.org, jolsa@redhat.com, ak@linux.intel.com, yao.jin@linux.intel.com, alexander.shishkin@linux.intel.com, adrian.hunter@intel.com, ricardo.neri-calderon@linux.intel.com Subject: Re: [PATCH V5 04/25] perf/x86/intel: Hybrid PMU support for perf capabilities Message-ID: References: <1617635467-181510-1-git-send-email-kan.liang@linux.intel.com> <1617635467-181510-5-git-send-email-kan.liang@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1617635467-181510-5-git-send-email-kan.liang@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 05, 2021 at 08:10:46AM -0700, kan.liang@linux.intel.com wrote: > +#define is_hybrid() (!!x86_pmu.num_hybrid_pmus) Given this is sprinkled all over the place, can you make this a static_key_false + static_branch_unlikely() such that the hybrid case is out-of-line?