Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp172602pxj; Wed, 16 Jun 2021 23:35:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2t/zwH+1RJ5pfp/80myobZ0N8PxZXiyPKNvGNI8AOM8mP0I0UZndBl4T43mMK6NTKvsEx X-Received: by 2002:a05:6e02:e53:: with SMTP id l19mr2521252ilk.15.1623911743733; Wed, 16 Jun 2021 23:35:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623911743; cv=none; d=google.com; s=arc-20160816; b=CbogTWy8qtusQd8al21OuU4brZ/AwlpMdhFJ4xGTxdVd6tK++ex27+v34W0e0BxD06 9quYf9EdY6C+zD8swsVtrg/hR8kK3oWfJcvd4GW2/m4Tw9+XKBbogP63/e0EOA1Ll3SM TPxrgCnZV3Y59lITz3eB9xF8EsIR6iOQpzOl56S+H+mQ9LfX3tu2fwvRqu12XJftxhRo Zjl7nQfla62PAcOhZjg9cnU8OmRGN8ikGYrSNnLjC11nuU5JpYktlPvws/rwr9YjtZvd Nr2TCsjZA/4WmgWnOydxd4onXX0XN+OTIzSLpgAsiclNGGfloowVgBPuK3XDJcTMeniF vAqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:in-reply-to:user-agent:date:message-id:from :references:cc:to:subject:dkim-signature; bh=PpBlJMekb7/xP2iTzZYrGLtbYT9ZT6tGKIE7GTX75SM=; b=FfaMgL58M3knbEUmSa21Y4xl6pPUmUbDXIuL6/9IwmwlIh8F+oe2hrMGDwMm3duLNh rXFw5L7V8EZ6mFVlnAgy2FUXcG+9S6o4jkaObLWtwHpM0NYHUjSGyQNUio4IyVJE92zg 6LzyC5ZpFIMWcpYirY7acAZAEn3h48Asfi5l5/f/pgjUlyw9X4d/qJ4ZZuHAcRBk+6vJ ntNWRNq2hSxY9m0HKahzUG5M2wdCqa9L9LJH8pDAONVkp5kFZ2uQu256oDldDMSwxmB0 8K43avMjIEcpsFcvBZnxp2lKaoqNfoc4h1d+tZwOWnnrfZrEf6/0ustRAAHNNmmQMg2F jIKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=G1IjcJCT; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m3si4726251ild.74.2021.06.16.23.35.30; Wed, 16 Jun 2021 23:35:43 -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=@ibm.com header.s=pp1 header.b=G1IjcJCT; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230001AbhFQGfy (ORCPT + 99 others); Thu, 17 Jun 2021 02:35:54 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:39182 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229565AbhFQGfx (ORCPT ); Thu, 17 Jun 2021 02:35:53 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15H6KVqR026133; Thu, 17 Jun 2021 02:33:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=subject : to : cc : references : from : message-id : date : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pp1; bh=PpBlJMekb7/xP2iTzZYrGLtbYT9ZT6tGKIE7GTX75SM=; b=G1IjcJCT31ASjBNcOGYhDKgKRhuDPEr6b9rUhl4E/ard6X5+tH5X5ooYm+D1OGGchYrS qj3uz9AnqDgeGAgSL2l0AXXeK/bsm9njz/THEaQlMm0WoT8xeGKrzvW3Y3Z4ANwIxdqR D0N2tRrNZmXvZHyW2bUj8GZqqYYc431NN1Kh0WXpROqF1LaVOX+SCFHx3N//QB0NjWGN oEAxJfJNBE9pfGLrTAmczOcFDzz40NOIZqCw3KHemR4NBbevgrKcGQJgcBem7TNR+7N4 3Ohi22vDyRcWO+Va7Zq8lN6wfJbg3d6VQPt4L2r6mhAWIOQbJhBWOL56B97uKGiQZr7V JQ== Received: from ppma01wdc.us.ibm.com (fd.55.37a9.ip4.static.sl-reverse.com [169.55.85.253]) by mx0a-001b2d01.pphosted.com with ESMTP id 39811u88w8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Jun 2021 02:33:07 -0400 Received: from pps.filterd (ppma01wdc.us.ibm.com [127.0.0.1]) by ppma01wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 15H6VVrT016986; Thu, 17 Jun 2021 06:33:06 GMT Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by ppma01wdc.us.ibm.com with ESMTP id 394mj9pgf7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Jun 2021 06:33:06 +0000 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 15H6X51Y12649114 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 17 Jun 2021 06:33:05 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F40C1C6059; Thu, 17 Jun 2021 06:33:04 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2FBBDC6055; Thu, 17 Jun 2021 06:32:59 +0000 (GMT) Received: from localhost.localdomain (unknown [9.199.36.139]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 17 Jun 2021 06:32:58 +0000 (GMT) Subject: Re: [PATCH v2 0/4] Add perf interface to expose nvdimm To: Nageswara Sastry Cc: mpe@ellerman.id.au, linuxppc-dev@lists.ozlabs.org, nvdimm@lists.linux.dev, linux-kernel@vger.kernel.org, peterz@infradead.org, maddy@linux.vnet.ibm.com, santosh@fossix.org, aneesh.kumar@linux.ibm.com, vaibhav@linux.ibm.com, dan.j.williams@intel.com, ira.weiny@intel.com, Athira Rajeev , tglx@linutronix.de References: <20210614052326.285710-1-kjain@linux.ibm.com> From: kajoljain Message-ID: <14a63986-8a99-26dc-d207-7ff902df3afa@linux.ibm.com> Date: Thu, 17 Jun 2021 12:02:56 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 7R4RhjD38HIv6GWshwH_hBt71ej_o28- X-Proofpoint-GUID: 7R4RhjD38HIv6GWshwH_hBt71ej_o28- Content-Transfer-Encoding: 7bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.790 definitions=2021-06-17_02:2021-06-15,2021-06-17 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 malwarescore=0 mlxlogscore=999 spamscore=0 phishscore=0 mlxscore=0 adultscore=0 clxscore=1015 suspectscore=0 priorityscore=1501 impostorscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106170041 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/16/21 4:25 PM, Nageswara Sastry wrote: > > >> On 14-Jun-2021, at 10:53 AM, Kajol Jain wrote: >> >> Patchset adds performance stats reporting support for nvdimm. >> Added interface includes support for pmu register/unregister >> functions. A structure is added called nvdimm_pmu to be used for >> adding arch/platform specific data such as supported events, cpumask >> pmu event functions like event_init/add/read/del. >> User could use the standard perf tool to access perf >> events exposed via pmu. >> >> Added implementation to expose IBM pseries platform nmem* >> device performance stats using this interface. >> ... >> >> Patch1: >> Introduces the nvdimm_pmu structure >> Patch2: >> Adds common interface to add arch/platform specific data >> includes supported events, pmu event functions. It also >> adds code for cpu hotplug support. >> Patch3: >> Add code in arch/powerpc/platform/pseries/papr_scm.c to expose >> nmem* pmu. It fills in the nvdimm_pmu structure with event attrs >> cpumask andevent functions and then registers the pmu by adding >> callbacks to register_nvdimm_pmu. >> Patch4: >> Sysfs documentation patch > > Tested with the following scenarios: > 1. Check dmesg for nmem PMU registered messages. > 2. Listed nmem events using 'perf list and perf list nmem' > 3. Ran 'perf stat' with single event, grouping events, events from same pmu, > different pmu and invalid events > 4. Read from sysfs files, Writing in to sysfs files > 5. While running nmem events with perf stat, offline cpu from the nmem?/cpumask > > While running the above functionality worked as expected, no error messages seen > in dmesg. > > Tested-by: Nageswara R Sastry Hi Nageswara, Thanks for testing the patch-set. There is a nit change which need to be done in patch 4(Documentation patch). We need to update nvdimm mailing list from linux-nvdimm@lists.01.org to nvdimm@lists.linux.dev. I will make this change and send a new patch-set with your tested-by tag. Thanks, Kajol Jain > >> >> Changelog >> --- >> PATCH v1 -> PATCH v2 >> - Fix hotplug code by adding pmu migration call >> incase current designated cpu got offline. As >> pointed by Peter Zijlstra. >> >> - Removed the retun -1 part from cpu hotplug offline >> function. >> >> - Link to the previous patchset : https://lkml.org/lkml/2021/6/8/500 >> --- >> Kajol Jain (4): >> drivers/nvdimm: Add nvdimm pmu structure >> drivers/nvdimm: Add perf interface to expose nvdimm performance stats >> powerpc/papr_scm: Add perf interface support >> powerpc/papr_scm: Document papr_scm sysfs event format entries >> >> Documentation/ABI/testing/sysfs-bus-papr-pmem | 31 ++ >> arch/powerpc/include/asm/device.h | 5 + >> arch/powerpc/platforms/pseries/papr_scm.c | 365 ++++++++++++++++++ >> drivers/nvdimm/Makefile | 1 + >> drivers/nvdimm/nd_perf.c | 230 +++++++++++ >> include/linux/nd.h | 46 +++ >> 6 files changed, 678 insertions(+) >> create mode 100644 drivers/nvdimm/nd_perf.c >> > Thanks and Regards, > R.Nageswara Sastry > >> >