From patchwork Mon Oct 14 10:51:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 13834786 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 79CC4D16242 for ; Mon, 14 Oct 2024 11:20:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=MhnHgTHvXXByXykKlPXMmMk1Pzju6w8W5ajfPf38FAk=; b=16PdVAhAlAn9bDTDHP6fhnNcCg nB/jJ3qEQ1l50HkI1EJwhNaY/3sk/Vrs/Ndg0fEAtadHKMMSxNfy6QZAVQ1SDcq4hvKeWQErDuxul zt1BCmWVqPH5p2NhXMPHbXzoOqFvV2/Qek5kdLl1eYbjeq5lowZKc0LOY6MGLimV3QI7wyJg/L4w7 KLAwE+nhlcYwaW+EiD6T+bWbjMpraktRiXkGYeQ2sgKonj8vjTMVKyAud4oV6ZLy49qsMHF5p64Fc NbV0ooyZAP388COX7JFjoYCvUt9hxw7KZGkBjT803uWzNYOvY6BLQWhgWzpS+so1j5AL4ViprH6Zv NLJYRggg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t0J7p-00000004ttb-0aOr; Mon, 14 Oct 2024 11:20:33 +0000 Received: from mgamail.intel.com ([198.175.65.13]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t0IhC-00000004lKn-1b0J for linux-arm-kernel@lists.infradead.org; Mon, 14 Oct 2024 10:53:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728903182; x=1760439182; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QStAwdkye38HLwLvAfPzq8FmSRXF3FozST6s+/YdPUQ=; b=mXzeLSXmWU9CotgUYUHZHtQWRV/9bsaQqbT8Al+tdQnI1ReboWjeNwI4 tUe7wOyk1GrYCxTPm3/gIaPWCyuZOOIr90pmaThluyGq08occmZqhE6F6 cXdhaxCVxG76KmY6hc1MtY39x72s5DU0aZM5KquWRfolLEixUG9O+VppW ncODu85QHp3ZqwOImXLO4/IfYOHdLbrGsMFKDWsL44ZYSuFkFmQCzYiI4 uQKWnugOlZPNG6TChwZ7BcDelGKlvaDtmQOMB2iGQi3z78EZE4t78gEr1 NHPco6ujeVMYo3L+j7N8o70ATd78p7qXpVmONqOeJqPC5zGelmX7QM2Y7 w==; X-CSE-ConnectionGUID: Sc7740GgTOC0w8RU5nmm6w== X-CSE-MsgGUID: HQ1x/qgpRfyXxBS2OiOvMg== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="39366239" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="39366239" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2024 03:53:01 -0700 X-CSE-ConnectionGUID: KXz7A1ouSc6LG5Lp7VI4Nw== X-CSE-MsgGUID: yFL5uGHATLa793YCFFJskw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,202,1725346800"; d="scan'208";a="77727459" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO localhost.localdomain) ([10.245.115.59]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2024 03:52:51 -0700 From: Adrian Hunter To: Peter Zijlstra , Sean Christopherson , Paolo Bonzini Cc: Ingo Molnar , Mark Rutland , Alexander Shishkin , Heiko Carstens , Thomas Richter , Hendrik Brueckner , Suzuki K Poulose , Mike Leach , James Clark , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, Yicong Yang , Jonathan Cameron , Will Deacon , Arnaldo Carvalho de Melo , Jiri Olsa , Namhyung Kim , Ian Rogers , Andi Kleen , Thomas Gleixner , Borislav Petkov , Dave Hansen , x86@kernel.org, H Peter Anvin , Kan Liang , Zhenyu Wang , mizhang@google.com, kvm@vger.kernel.org, Shuah Khan , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: [PATCH V13 07/14] perf/x86/intel: Do not enable large PEBS for events with aux actions or aux sampling Date: Mon, 14 Oct 2024 13:51:17 +0300 Message-ID: <20241014105124.24473-8-adrian.hunter@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241014105124.24473-1-adrian.hunter@intel.com> References: <20241014105124.24473-1-adrian.hunter@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241014_035302_535728_793D0927 X-CRM114-Status: GOOD ( 13.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Events with aux actions or aux sampling expect the PMI to coincide with the event, which does not happen for large PEBS, so do not enable large PEBS in that case. Signed-off-by: Adrian Hunter Reviewed-by: Andi Kleen --- Changes in V11: Remove definition of has_aux_action() because it has already been added as an inline function. arch/x86/events/intel/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c index 7ca40002a19b..bb284aff7bfd 100644 --- a/arch/x86/events/intel/core.c +++ b/arch/x86/events/intel/core.c @@ -3962,8 +3962,8 @@ static int intel_pmu_hw_config(struct perf_event *event) if (!(event->attr.freq || (event->attr.wakeup_events && !event->attr.watermark))) { event->hw.flags |= PERF_X86_EVENT_AUTO_RELOAD; - if (!(event->attr.sample_type & - ~intel_pmu_large_pebs_flags(event))) { + if (!(event->attr.sample_type & ~intel_pmu_large_pebs_flags(event)) && + !has_aux_action(event)) { event->hw.flags |= PERF_X86_EVENT_LARGE_PEBS; event->attach_state |= PERF_ATTACH_SCHED_CB; }