From patchwork Thu Oct 20 01:51:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, Ying" X-Patchwork-Id: 13012543 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6122C4332F for ; Thu, 20 Oct 2022 01:51:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 406AA6B0071; Wed, 19 Oct 2022 21:51:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3B6CB6B0073; Wed, 19 Oct 2022 21:51:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 27E226B0078; Wed, 19 Oct 2022 21:51:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 188626B0071 for ; Wed, 19 Oct 2022 21:51:34 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id E0AA41602C3 for ; Thu, 20 Oct 2022 01:51:33 +0000 (UTC) X-FDA: 80039650866.30.3BA8660 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by imf04.hostedemail.com (Postfix) with ESMTP id 0596940029 for ; Thu, 20 Oct 2022 01:51:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666230692; x=1697766692; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=jqVvHxPo050Zb28QPRhB5MKlDfuC+lZT57Gtdn8Tgy4=; b=nA8fjtdXEAezkvzYZ21iqZQzJcOeSxwIz3LYNaAmNA/e0arsw8MDhqHH LQz0EKqpKE0vg87MLrGjTZerhLPc4ZS5Gs3apMMWgnu+VN8djQsW9KxxV b3/ng2iAreU8MaRBOAoiDcqFfMTriS8wUZwE5O/vLcrtH5xJZTVUfzE75 rBpWcU7ssn8CKAb3BLsUZAI5PTxZL2jL+chedzmhLtEeUXwIswE+rT8PA OpiSS3sLHlfoTHw6BBu0id5PL7vaC1FBdebwy/5EhBuDgsIsGpwu8uu7q B7yOk+E12C68JHJHO+c+2GIXD3LgnuMnGzSSnAClgh61H6QLAs718hMH9 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10505"; a="286975082" X-IronPort-AV: E=Sophos;i="5.95,196,1661842800"; d="scan'208";a="286975082" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2022 18:51:30 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10505"; a="772070468" X-IronPort-AV: E=Sophos;i="5.95,196,1661842800"; d="scan'208";a="772070468" Received: from yhuang6-mobl2.sh.intel.com ([10.238.6.69]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2022 18:51:26 -0700 From: Huang Ying To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, Andrew Morton , Huang Ying , "Aneesh Kumar K . V" , Alistair Popple , Bharata B Rao , Dan Williams , Dave Hansen , Davidlohr Bueso , Hesham Almatary , Jagdish Gediya , Johannes Weiner , Jonathan Cameron , Michal Hocko , Tim Chen , Wei Xu , Yang Shi Subject: [PATCH] memory tier, sysfs: rename attribute "nodes" to "nodelist" Date: Thu, 20 Oct 2022 09:51:22 +0800 Message-Id: <20221020015122.290097-1-ying.huang@intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666230692; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=bmo0y/Wr+Ne5ZmH3Qd5cQJqPZgkRevPDdp6aph+/XsE=; b=r3n2MsVxN6i6irg3+X4s0Gbkb+npRxvDguhCZpxFieTIRI+LmRad1xj3lb5fC87PC8U9eY sRfOUgfhiw+mGSuD/32N1w4Ma8Xsr5w35DU/KQ3MR57ibbOCSq0P/oUb8J8A1DXuJ99F7N BfLcpC14zbn3tkfG5A9X+gsY0i6dKzE= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=nA8fjtdX; spf=pass (imf04.hostedemail.com: domain of ying.huang@intel.com designates 192.55.52.151 as permitted sender) smtp.mailfrom=ying.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666230692; a=rsa-sha256; cv=none; b=PW8mGOzozI9X0+VpGJFJ83mtk2QNIK728q5qWCmuh+aOHW8+rdRcylf0NA5bSrWYMPjZKO h8qD+bDXWitspbBF/wVrNsUPiE5DwujaJM2zba0HcudGv+xHI9fd5P/HbFDZSflnpiWuXE iOnzgCaaLSq3x4RX0zJcaRIivw9pMoc= X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 0596940029 X-Rspam-User: Authentication-Results: imf04.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=nA8fjtdX; spf=pass (imf04.hostedemail.com: domain of ying.huang@intel.com designates 192.55.52.151 as permitted sender) smtp.mailfrom=ying.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com X-Stat-Signature: xd9eo1toutei65c5q9ttnb618c4r5aar X-HE-Tag: 1666230691-803538 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: In sysfs, we use attribute name "cpumap" or "cpus" for cpu mask and "cpulist" or "cpus_list" for cpu list. For example, in my system, $ cat /sys/devices/system/node/node0/cpumap f,ffffffff $ cat /sys/devices/system/cpu/cpu2/topology/core_cpus 0,00100004 $ cat cat /sys/devices/system/node/node0/cpulist 0-35 $ cat /sys/devices/system/cpu/cpu2/topology/core_cpus_list 2,20 It looks reasonable to use "nodemap" for node mask and "nodelist" for node list. So, rename the attribute to follow the naming convention. Signed-off-by: "Huang, Ying" Cc: Aneesh Kumar K.V Cc: Alistair Popple Cc: Bharata B Rao Cc: Dan Williams Cc: Dave Hansen Cc: Davidlohr Bueso Cc: Hesham Almatary Cc: Jagdish Gediya Cc: Johannes Weiner Cc: Jonathan Cameron Cc: Michal Hocko Cc: Tim Chen Cc: Wei Xu Cc: Yang Shi Acked-by: Wei Xu Reviewed-by: Aneesh Kumar K.V Reviewed-by: Yang Shi Reviewed-by: Davidlohr Bueso --- Documentation/ABI/testing/sysfs-kernel-mm-memory-tiers | 4 ++-- mm/memory-tiers.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-kernel-mm-memory-tiers b/Documentation/ABI/testing/sysfs-kernel-mm-memory-tiers index 45985e411f13..721a05b90109 100644 --- a/Documentation/ABI/testing/sysfs-kernel-mm-memory-tiers +++ b/Documentation/ABI/testing/sysfs-kernel-mm-memory-tiers @@ -10,7 +10,7 @@ Description: A collection of all the memory tiers allocated. What: /sys/devices/virtual/memory_tiering/memory_tierN/ - /sys/devices/virtual/memory_tiering/memory_tierN/nodes + /sys/devices/virtual/memory_tiering/memory_tierN/nodelist Date: August 2022 Contact: Linux memory management mailing list Description: Directory with details of a specific memory tier @@ -21,5 +21,5 @@ Description: Directory with details of a specific memory tier A smaller value of N implies a higher (faster) memory tier in the hierarchy. - nodes: NUMA nodes that are part of this memory tier. + nodelist: NUMA nodes that are part of this memory tier. diff --git a/mm/memory-tiers.c b/mm/memory-tiers.c index f116b7b6333e..fa8c9d07f9ce 100644 --- a/mm/memory-tiers.c +++ b/mm/memory-tiers.c @@ -131,8 +131,8 @@ static void memory_tier_device_release(struct device *dev) kfree(tier); } -static ssize_t nodes_show(struct device *dev, - struct device_attribute *attr, char *buf) +static ssize_t nodelist_show(struct device *dev, + struct device_attribute *attr, char *buf) { int ret; nodemask_t nmask; @@ -143,10 +143,10 @@ static ssize_t nodes_show(struct device *dev, mutex_unlock(&memory_tier_lock); return ret; } -static DEVICE_ATTR_RO(nodes); +static DEVICE_ATTR_RO(nodelist); static struct attribute *memtier_dev_attrs[] = { - &dev_attr_nodes.attr, + &dev_attr_nodelist.attr, NULL };