Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2379242pxj; Sun, 16 May 2021 23:47:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPHsYCEh1IP6cCxw2AMu+f/5azv9rjS/lSfomSbgtsMZ7U5uS5vHY2ZGj67Mo/TOeZO5/x X-Received: by 2002:a05:6e02:12cb:: with SMTP id i11mr50868626ilm.221.1621234065948; Sun, 16 May 2021 23:47:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621234065; cv=none; d=google.com; s=arc-20160816; b=WhmGcRgdXVTOscGyH92XDs+78n9eBB3adMVVLQx6okAoHZRu/PsO3uNGaKyFBiDZA3 1zo2bTuJKGcuus14pVvMRroLRWx6M9vhi0VrpVLHMmF5FUJAKJI1DSL+cRb9EFixSlBc eEzSFE9+zjUVRX6YiAeZjRQ/pXHSRFwwBcSOZ7SxY1ceOt3SlPmEQLbNC25tK9GoWRFT VBjHMK1WlGIgaJV7SNG2/YvFGLwhAka1+1im0qFjDYZSz1ltrzoW8SiKtKBK/S28Z5R0 xO+ZRgdW52qgX7bd4ZASeDVRCumCr+jMfv0G+JIx/grkW5/PXTr8zUaJyG6mD8DDR9gN 4aIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=xdx0NJHTH3TXuVcwAPTBaPY/tyOPa2y5gp9KZo5KBSk=; b=lo9MmeRNHyA5fQXO8VjRAqyH2ZTQrtJF/VHM3XNVR9DG2ousFlZEUHA/GxP7iXcaWr JDOBTlBquDPhsNEuUoZ4/OXStyL5jmA6qFJwH28qMldn91nkAs4EXGMu951qjqSsUm+a xbXIIxhJWs6cxqOqhvLihd16E7iWdF9ybsrnvSV1HI74E+ISSEViQPXPJpe1fg2xLwPR tmqoP7Qx/SbLNLakJQcwu1P74wflObnjE5J3Gi7ta29k4a/VG8V5IgEOQ3HGxtgw8mcu CmNXzvk9B8SgUAV4ZhR0xrsVHH5dTxn3MAkVs7lb7lazOzDPac4OM/dB49xl5UXEkGKL hdpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=tXLjkVFa; 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 s19si16233079iow.52.2021.05.16.23.47.33; Sun, 16 May 2021 23:47:45 -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=tXLjkVFa; 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 S231543AbhEQGoz (ORCPT + 99 others); Mon, 17 May 2021 02:44:55 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:57560 "EHLO mx0b-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229527AbhEQGoy (ORCPT ); Mon, 17 May 2021 02:44:54 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 14H6XvD2122432; Mon, 17 May 2021 02:43:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=xdx0NJHTH3TXuVcwAPTBaPY/tyOPa2y5gp9KZo5KBSk=; b=tXLjkVFaDsm8q/W9O2/Z2JLJgJfh0YA23k5Xh1QX9Sps+b5hOIfj5cPT3WxocUwQrmKJ 8RCSVAIAjhV+WV82gyNFvZHM+hLxR45mQ5a6piiFeJs6V569a1rU9/UPoq4iqIb2xcNM JizJWqVkzqzt5wYW6v4pk7aVt9bh2d09WOdU/h8ymXVq9Q0VMtnlEuVz3Doa5E7kNbeB i/vp+o1wXst81rkJaKN121Qf2kb/iJM4GA7Ia12KvAtqX/PUpO1Srp4prfqykgz7tEE5 uEWDRIP0HORfOlv+NefNKaKY7Xs5giRiXWJIxGMSQyfB4AcJHq6BCtZ+9YxcHKVfe7bf Gw== Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0a-001b2d01.pphosted.com with ESMTP id 38kjmss77y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 17 May 2021 02:43:10 -0400 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.0.43/8.16.0.43) with SMTP id 14H6RFIi027591; Mon, 17 May 2021 06:43:09 GMT Received: from b03cxnp08028.gho.boulder.ibm.com (b03cxnp08028.gho.boulder.ibm.com [9.17.130.20]) by ppma01dal.us.ibm.com with ESMTP id 38j5x90ced-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 17 May 2021 06:43:09 +0000 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 14H6h7n627853142 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 17 May 2021 06:43:07 GMT Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 80BC9BE051; Mon, 17 May 2021 06:43:07 +0000 (GMT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AC879BE054; Mon, 17 May 2021 06:43:02 +0000 (GMT) Received: from localhost.localdomain (unknown [9.199.47.29]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP; Mon, 17 May 2021 06:43:02 +0000 (GMT) Subject: Re: [RFC 1/4] drivers/nvdimm: Add perf interface to expose nvdimm performance stats To: Peter Zijlstra Cc: mpe@ellerman.id.au, linuxppc-dev@lists.ozlabs.org, linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.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, atrajeev@linux.vnet.ibm.com, tglx@linutronix.de References: <20210512163824.255370-1-kjain@linux.ibm.com> <20210512163824.255370-2-kjain@linux.ibm.com> <37015d53-050a-acef-2958-b1ff5d02800b@linux.ibm.com> From: kajoljain Message-ID: Date: Mon, 17 May 2021 12:13:00 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: xDZBL9g-YAuBZJRqZNYjG2Yjrq2uXwea X-Proofpoint-GUID: xDZBL9g-YAuBZJRqZNYjG2Yjrq2uXwea X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.761 definitions=2021-05-17_01:2021-05-12,2021-05-17 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 mlxscore=0 impostorscore=0 lowpriorityscore=0 spamscore=0 mlxlogscore=794 priorityscore=1501 phishscore=0 suspectscore=0 adultscore=0 bulkscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2105170046 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/14/21 5:17 PM, Peter Zijlstra wrote: > On Thu, May 13, 2021 at 05:56:14PM +0530, kajoljain wrote: > >> But yes the current read/add/del functions are not adding value. We >> could add an arch/platform specific function which could handle the >> capturing of the counter data and do the rest of the operation here, >> is this approach better? > > Right; have your register_nvdimm_pmu() set pmu->{add,del,read} to > nd_pmu->{add,del,read} directly, don't bother with these intermediates. > Also you can WARN_ON_ONCE() if any of them are NULL and fail > registration at that point. > Hi Peter, I will make all required changes and send next version of this patchset soon. Thanks, Kajol Jain