Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp598902rdb; Tue, 23 Jan 2024 08:51:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IGBnwjzcb2RsnWi1YZiLjf2W7EWBPSxim6Cv0/HDcZKsLaE82eS/hmX5RzunTWdcfgtwaLs X-Received: by 2002:a05:6358:2908:b0:175:c21c:87c4 with SMTP id y8-20020a056358290800b00175c21c87c4mr7343715rwb.53.1706028699199; Tue, 23 Jan 2024 08:51:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706028699; cv=pass; d=google.com; s=arc-20160816; b=UN8M/kivA3Hp3ISfZO6Rfd1Pfz4d/2B36xrqIoM/dAAhTHrUNUEB1goWkKcNeyU3CJ JaUsy9ffz7DmR6uSQaB5wGkPDignBsF6gtub5ljzEAFE0OEmARUypYtWShGts7SJRvOQ 0b0uRQFQG31KONdAD8m7vBIcyuIaRH1SHNlrj94PK6OfyMb+lUJnRyuFVAO2RYeHGCfQ aB9qqIDUqb9oVtiLtC2/Ipd1TnKN4j4BK3r0YeHl+pYfdZM06GMCew06RX3sWGBSWW8E jxmgs0GVxuhKYA3O4nL++dtwisoq8wu5HG0IY0nqTMUTtRpvRuojVLLB/rYdspvEcfFK AEJQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=BkKOFce6QtRKwexZTJFHwxJUY9vT8YNVpVjA0XCsBWY=; fh=yZIRsOc9JNKW2BJPJoEySSpKv336F2PVXdBLuwpy164=; b=IdhsowpiRBslO+olxk6NWyM/9Vw6t/BC03yia0ydFGRgpWt/XWbpxSgkmd7OOUsYe0 JNFJGHR0TFZKHS6ZwvusDWx1NbVOYum9DWL4j8ppWdMW4ndHn4tvnSTsp2i8QMuJyQuM hdoA/fjooFNmblSLsA4GmKVUqknE4TTff/e4s8wzGd/EyhVb/c+ARyoXHN/z9w5E3iU3 FElVsZ06imaOMb5rZUz9sbgMgrI4XDfwXM7A3A+6lDW0XlWlQU0dl1hCiy8pNkIfuLDQ ggzBx/6+lWnE2htkUp5GVpPfFwZtMepICgBiO0I1hFNyopxqiFbc5dj6++2Pz254j03i d9BQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Ks6Fdd+h; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-35459-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35459-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id q124-20020a632a82000000b005d479e1295csi122853pgq.492.2024.01.23.08.51.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 08:51:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35459-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Ks6Fdd+h; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-35459-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35459-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id D584EB29887 for ; Tue, 23 Jan 2024 14:36:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0C335482E4; Tue, 23 Jan 2024 14:36:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Ks6Fdd+h" Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9081212E5F; Tue, 23 Jan 2024 14:36:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=134.134.136.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706020604; cv=none; b=dknjkR3R95i3s2oD1x2sY+tWaT+6gXjuszFdWzT+4Md4JUBVZU8KgE9Z7tWpP1M2tb3WVn8zGY797+B4RxkVhk3QKzQY6834a8Pyv1iotoGdu3Eumv2uoPmJb+EXxZIJeQ9FP8gPpFPRNcncdl2lHzpo3+LuB5dB5awTK/S4OiM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706020604; c=relaxed/simple; bh=b5WsAWXcMZJ3oedYBhrg7imN/aUDHQ+7R2QdjuUQDzU=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=rpDMEHsm/ElNyn6/sgrPEr8rYQnATLQbLdTzg+RXEBqjQq0eeYHfTjpV/9UTNeBGV7jZkkAwtw7Spxf44DmGuXLVbESA0oC58v5b34pTMyIiZSmX41N2xmBrxPEcGv9m4OZNT0evoVen42fB94r6pUxDQDgTFnbV9Jp5LVvUL24= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Ks6Fdd+h; arc=none smtp.client-ip=134.134.136.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706020602; x=1737556602; h=message-id:date:mime-version:subject:to:references:from: in-reply-to:content-transfer-encoding; bh=b5WsAWXcMZJ3oedYBhrg7imN/aUDHQ+7R2QdjuUQDzU=; b=Ks6Fdd+hiWQw3oKh6gdu62fpvKw00cGo5xg9DjpCa/ns0UXRKOXpDn5F ULcBOZAhcE3MDQPhlZNvoBNpBu8kDSk1D01p/amYvnT3EG+qlLBJb+z6U lXnW/YZ06qYh8i0AEK+1e14SGI6hqJmd6mXvlBGhvSlENossjLM9Rm+KD CYmjTaH+9OUIKy+LEmZ9MGqiQipdTSwSuLh89tiUV/Z0LqOJH9sGOwSGC 3Idch6z/xUPRypuCBaJQTy14RB0KBMvF1+POUAB573B/KTvVmE3ghWvyZ XB41R5Lrzsk7DwPDWo8n/6oc59lmnw3Xr2PxDY1pKAmbK1IEGRHIz+gZO g==; X-IronPort-AV: E=McAfee;i="6600,9927,10962"; a="405295082" X-IronPort-AV: E=Sophos;i="6.05,214,1701158400"; d="scan'208";a="405295082" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jan 2024 06:36:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,214,1701158400"; d="scan'208";a="34426302" Received: from linux.intel.com ([10.54.29.200]) by orviesa001.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jan 2024 06:36:42 -0800 Received: from [10.212.112.252] (unknown [10.212.112.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by linux.intel.com (Postfix) with ESMTPS id AE968580CA5; Tue, 23 Jan 2024 06:36:38 -0800 (PST) Message-ID: <0d85e3f6-d857-4c62-8ad8-c20ac2665e91@linux.intel.com> Date: Tue, 23 Jan 2024 09:36:37 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH V3 0/7] Clean up perf mem To: Thomas Richter , kajoljain , acme@kernel.org, irogers@google.com, peterz@infradead.org, mingo@redhat.com, namhyung@kernel.org, jolsa@kernel.org, adrian.hunter@intel.com, john.g.garry@oracle.com, will@kernel.org, james.clark@arm.com, mike.leach@linaro.org, leo.yan@linaro.org, yuhaixin.yhx@linux.alibaba.com, renyu.zj@linux.alibaba.com, ravi.bangoria@amd.com, atrajeev@linux.vnet.ibm.com, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20231213195154.1085945-1-kan.liang@linux.intel.com> <8bfadc86-e137-4a9f-a9ce-0bc62464c195@linux.intel.com> <057a1c19-3117-1aec-41d6-4950c599b862@linux.ibm.com> <692e16f9-062c-4b3c-bd66-a16bac68216c@linux.intel.com> <6ace2f9f-b073-e22b-0dd6-69c52814d49a@linux.ibm.com> Content-Language: en-US From: "Liang, Kan" In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2024-01-23 12:56 a.m., Thomas Richter wrote: > On 1/23/24 06:30, kajoljain wrote: >> >> >> On 1/16/24 22:07, Liang, Kan wrote: >>> >>> >>> On 2024-01-16 9:05 a.m., kajoljain wrote: >>>>> For powerpc, the patch 3 introduced a perf_mem_events_power, which >>>>> doesn't have ldlat. But it only be assigned to the pmu->is_core. I'm not >>>>> sure if it's the problem. >>>> Hi Kan, >>>> Correct there were some small issues with patch 3, I added fix for that. >>>> >>> >>> Thanks Kajol Jain! I will fold your fix into V4. >>> >>>>> Also, S390 still uses the default perf_mem_events, which includes ldlat. >>>>> I'm not sure if S390 supports the ldlat. >>>> I checked it, I didn't find ldlat parameter defined in arch/s390 >>>> directory. I think its better to make default ldlat value as false >>>> in tools/perf/util/mem-events.c file. >>> >>> The s390 may not be the only user for the default perf_mem_events[] in >>> the tools/perf/util/mem-events.c. We probably cannot change the default >>> value. >>> We may share the perf_mem_events_power[] between powerpc and s390. (We >>> did the similar share for arm and arm64.) >>> >>> How about the below patch (not tested.) >>> >>> diff --git a/tools/perf/arch/s390/util/pmu.c >>> b/tools/perf/arch/s390/util/pmu.c >>> index 225d7dc2379c..411034c984bb 100644 >>> --- a/tools/perf/arch/s390/util/pmu.c >>> +++ b/tools/perf/arch/s390/util/pmu.c >>> @@ -8,6 +8,7 @@ >>> #include >>> >>> #include "../../../util/pmu.h" >>> +#include "../../powerpc/util/mem-events.h" >>> >>> #define S390_PMUPAI_CRYPTO "pai_crypto" >>> #define S390_PMUPAI_EXT "pai_ext" >>> @@ -21,5 +22,5 @@ void perf_pmu__arch_init(struct perf_pmu *pmu) >>> pmu->selectable = true; >>> >>> if (pmu->is_core) >>> - pmu->mem_events = perf_mem_events; >>> + pmu->mem_events = perf_mem_events_power; >>> } >>> >>> >>> >>> However, the original s390 code doesn't include any s390 specific code >>> for perf_mem. So I thought it uses the default perf_mem_events[]. >>> Is there something I missed? >>> >>> Or does the s390 even support mem events? If not, I may remove the >>> mem_events from s390. >> >> Hi Kan, >> I don't have s390 system to do testing. But from my end I am fine >> with the changes. >> >> Thanks, >> Kajol Jain >> > > s390 does not support perf mem at all. Right now it is save to remove it from s390. Thanks for the confirmation! Thanks, Kan > Thanks > >>> >>> Thanks, >>> Kan >> >