Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp706590pxm; Fri, 25 Feb 2022 17:51:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJzpoVqcpKKiBVigzR7jz+4Spb4sLLyqfIT7bJjsbE+sr6KhEqkJCLIybDFv8zDr+gJ0nZVl X-Received: by 2002:a63:91c8:0:b0:372:ba54:7ec2 with SMTP id l191-20020a6391c8000000b00372ba547ec2mr8311046pge.131.1645840264946; Fri, 25 Feb 2022 17:51:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645840264; cv=none; d=google.com; s=arc-20160816; b=pHvpg62iSypZWuqokrzIEb5DDoAiOnK7gvIBYEgFQPGCy4ne7oVxEfT4A2fBRJgiCe xeyHu9lAPErWIHKCfAk0qxrWsSDgfyk6NrPdwyhhceclcIvav5FbzmmUM+c/eMbgPjc4 nmcL8x4ByqHEnDkLnBEpOTQHM9XHvBLmCj7b1fprK++AE2t6hg98bWPorLpUO/1L4Rkm hGATdUyGvsUx+kO0Pt0ElD5KRDndX/IS63sW51UUiux9/auTkR/m6j0gs9P5WlAJWTh1 uqE+nYhflLjIN6dbIQQ+AJudWiDdyv0PwnWweLtl2L3rewojv83Wb2TX/H55euLZb7WW YnQA== 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 :user-agent:organization:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=AcatjmiBHbccUpcc7TaHOoYhFJm1bkKhJ0c85l+DH3I=; b=hXnBZ7i/eKsHw73IOT/ou7lr7brYLywps2NRDBxHzAQNexVWeUebDj8zWSXPWq2061 tMBBJL0QzMM2xDn0hdW9kmpqLBbMY6e6uLJd+kgrY4wO+GbzI9agFyoX0sM5w5GDWBM1 +sLZtxIcqkaiS2bf3zIpVpNcGkXHwkxJevOHrEEqY9YA2eHvR9nc3j0Ks/rQqRRxaNhd MDP99C8KXDCWE4gjDcwQNEa7IPQt3M1AI/J+CnyKoZawjkJWp8QYlAdQL9FlwpahSChs iH2kE5h8/gTxLtL3tXgomOeO62EnULDsUkwr02B92DUJY/7malc4ujrxh3tH67YC4V0F oF8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=DaAZEPh3; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id f20-20020a633814000000b00370246ab5f7si3312132pga.421.2022.02.25.17.51.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Feb 2022 17:51:04 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=DaAZEPh3; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0105C19286; Fri, 25 Feb 2022 17:37:58 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238258AbiBYHsf (ORCPT + 99 others); Fri, 25 Feb 2022 02:48:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238249AbiBYHsX (ORCPT ); Fri, 25 Feb 2022 02:48:23 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96BEF24FA3A for ; Thu, 24 Feb 2022 23:47:52 -0800 (PST) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 21P4TuLx026634; Fri, 25 Feb 2022 07:47:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : subject : from : to : cc : date : in-reply-to : references : content-type : content-transfer-encoding : mime-version; s=pp1; bh=AcatjmiBHbccUpcc7TaHOoYhFJm1bkKhJ0c85l+DH3I=; b=DaAZEPh3Krjhza8G5X7WYKd5mvXv/agogDXHR/e8pnvGM85o8WzwvZCLfwY+HDfXnFRy Y8ds9a4ND6yQoHQ60ARg2PpDRVDRNT7Kmt7U+ONrsJ6Ruy9C+ng7fDmslFkkigRGANA1 cq4kplfsFDsR8xgHF6aunf5++BnasogwjHciKgpBJVmJ1stDTZjcEsd1S6cAthuZ5g9x O80stGMdIEXFAMAXqgxU4pin3FBgrN/iT5FfWgKvzjvmvHeGPj7mipvxxjpk9pH+LYpS 6CMaxXKTERy4SFazBOQIg3dyPekIWG7BEy5NRhKo2bszG6DYbO//VH+e5bwpYOCsJ5wg wg== Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com with ESMTP id 3edwkf6a25-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 25 Feb 2022 07:47:27 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 21P7iwws003036; Fri, 25 Feb 2022 07:47:24 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma06ams.nl.ibm.com with ESMTP id 3eaqtjpv2k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 25 Feb 2022 07:47:24 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 21P7lLbu35455288 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 25 Feb 2022 07:47:21 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 250B952057; Fri, 25 Feb 2022 07:47:21 +0000 (GMT) Received: from [9.43.16.34] (unknown [9.43.16.34]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 9BFE152051; Fri, 25 Feb 2022 07:47:16 +0000 (GMT) Message-ID: <125761cdabbfeaf6615e67d087ec113408f8eb7e.camel@linux.ibm.com> Subject: Re: [PATCH v6 0/4] Add perf interface to expose nvdimm From: Aneesh Kumar K V To: kajoljain , Nageswara Sastry , mpe@ellerman.id.au, linuxppc-dev@lists.ozlabs.org, nvdimm@lists.linux.dev, linux-kernel@vger.kernel.org, peterz@infradead.org, dan.j.williams@intel.com, ira.weiny@intel.com, vishal.l.verma@intel.com Cc: santosh@fossix.org, maddy@linux.ibm.com, atrajeev@linux.vnet.ibm.com, vaibhav@linux.ibm.com, tglx@linutronix.de Date: Fri, 25 Feb 2022 13:17:15 +0530 In-Reply-To: References: <20220217163357.276036-1-kjain@linux.ibm.com> Organization: IBM Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-1.fc35) X-TM-AS-GCONF: 00 X-Proofpoint-GUID: KIO23H0IT1eV-_hrr8t5UPG0zJq5phzF X-Proofpoint-ORIG-GUID: KIO23H0IT1eV-_hrr8t5UPG0zJq5phzF Content-Transfer-Encoding: 8bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-02-25_05,2022-02-24_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 clxscore=1011 mlxscore=0 lowpriorityscore=0 phishscore=0 adultscore=0 suspectscore=0 bulkscore=0 mlxlogscore=999 priorityscore=1501 impostorscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2202250038 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2022-02-25 at 12:08 +0530, kajoljain wrote: > > > On 2/25/22 11:25, Nageswara Sastry wrote: > > > > > > On 17/02/22 10:03 pm, Kajol Jain wrote: > > > .... > > > > > > Changelog > > > > Tested these patches with the automated tests at > > avocado-misc-tests/perf/perf_nmem.py > > URL: > > https://github.com/avocado-framework-tests/avocado-misc-tests/blob/master/perf/perf_nmem.py > > > > > > 1. On the system where target id and online id were different then > > not > > seeing value in 'cpumask' and those tests failed. > > > > Example: > > Log from dmesg > > ... > > papr_scm ibm,persistent-memory:ibm,pmemory@44100003: Region > > registered > > with target node 1 and online node 0 > > ... > > Hi Nageswara Sastry, >        Thanks for testing the patch set. Yes you right, incase target > node id and online node id is different, it can happen when target > node is not online and hence can cause this issue, thanks for > pointing > it. > > Function dev_to_node will return node id for a given nvdimm device > which > can be offline in some scenarios. We should use numa node id return > by > numa_map_to_online_node function in that scenario. This function > incase > given node is offline, it will lookup for next closest online node > and > return that nodeid. > > Can you try with below change and see, if you are still getting this > issue. Please let me know. > > diff --git a/arch/powerpc/platforms/pseries/papr_scm.c > b/arch/powerpc/platforms/pseries/papr_scm.c > index bdf2620db461..4dd513d7c029 100644 > --- a/arch/powerpc/platforms/pseries/papr_scm.c > +++ b/arch/powerpc/platforms/pseries/papr_scm.c > @@ -536,7 +536,7 @@ static void papr_scm_pmu_register(struct > papr_scm_priv *p) >                                 PERF_PMU_CAP_NO_EXCLUDE; > >         /*updating the cpumask variable */ > -       nodeid = dev_to_node(&p->pdev->dev); > +       nodeid = numa_map_to_online_node(dev_to_node(&p->pdev->dev)); >         nd_pmu->arch_cpumask = *cpumask_of_node(nodeid); > > > Can you use p->region->numa_node? -aneesh