From patchwork Tue Oct 18 05:25:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, Ying" X-Patchwork-Id: 13009915 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 6A2E1C4332F for ; Tue, 18 Oct 2022 05:26:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 45B4B6B0078; Tue, 18 Oct 2022 01:26:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3DD5C6B0075; Tue, 18 Oct 2022 01:26:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 124738E0002; Tue, 18 Oct 2022 01:26:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id E6F236B0072 for ; Tue, 18 Oct 2022 01:26:11 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id BEF201A0EBA for ; Tue, 18 Oct 2022 05:26:11 +0000 (UTC) X-FDA: 80032934142.12.374AD87 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by imf05.hostedemail.com (Postfix) with ESMTP id C6384100030 for ; Tue, 18 Oct 2022 05:26:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666070769; x=1697606769; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=y2RqQYPqokfPxKDpaiZB+BcZNoeDLOFn+N6zZNXnkDQ=; b=UKC5XIETS4rXYAShD+TbSUKdzP12aFK6ekr/VFC6RPdXju8ElTgLyTMe guHwncsEyg5ulOPem5suHDi4556s63ACcRrRbvRtrCPoPLtKaXMHqxV4c NdQ+NviD5mfSHG50e2m9VGCJTXIblrIlJHExZD78MlHZ8KcGk/7qGMQDn PPwJvs9e8a7StpdyeU42/YVgjErr97Qpk+JD2G3XRpUW8drOrRv7M5Cmh E/jDMlqZQ8PPtyRAd1sCq/bopF998VOTx++R904G2A2a4Sef3PZ4c7anw hyUfrzHrKYYsdLRy9n1UHhWtGKfCSiN7uARSlVMYRI3D9vFOVP3cP9Abg w==; X-IronPort-AV: E=McAfee;i="6500,9779,10503"; a="307661789" X-IronPort-AV: E=Sophos;i="5.95,193,1661842800"; d="scan'208";a="307661789" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Oct 2022 22:26:08 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10503"; a="771043863" X-IronPort-AV: E=Sophos;i="5.95,193,1661842800"; d="scan'208";a="771043863" 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; 17 Oct 2022 22:26:02 -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: [RFC] memory tier, sysfs: rename attribute "nodes" to "nodes_list" Date: Tue, 18 Oct 2022 13:25:41 +0800 Message-Id: <20221018052541.265708-1-ying.huang@intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666070770; a=rsa-sha256; cv=none; b=Y7q8l0++EvrevgV2soZq+NC8Bw1hoYjk5l6RkmNhRD8KmuGfzltesYbIpqURUXWiW52pEj 76T0dTiY+beClfrM45bWbblbw5D9Q+d9NYAnmXqp9cekNMgHvZY9eBLZo0ftFeypAssS73 paXi7Hve0eF++1QRjZ9Ie+EV4+RN/IA= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=UKC5XIET; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf05.hostedemail.com: domain of ying.huang@intel.com designates 134.134.136.65 as permitted sender) smtp.mailfrom=ying.huang@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666070770; 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=MykepC8e0CoYFO0YhxpRp3FskY3Xb+H6od8UvkytrNE=; b=ioOuXJ19h4+mpweV/1tM2DgzAWFtDvNgihZC0d5sRnK2ibB16pHI2UPz4/IDPV9kSizjp+ aWCUUD8Qmm0b2Ag+waCvBfx2Q0HM9iIAhRVO/iTUVUK3tXIEJ5dVNA5yIHrYZucCX3uBSV yHnWOBF6MZDXeY1v8zos9adMKhnk+VY= X-Rspamd-Server: rspam05 X-Rspam-User: X-Rspamd-Queue-Id: C6384100030 Authentication-Results: imf05.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=UKC5XIET; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf05.hostedemail.com: domain of ying.huang@intel.com designates 134.134.136.65 as permitted sender) smtp.mailfrom=ying.huang@intel.com X-Stat-Signature: yu3jsm5i3h6fx1j1xe5nqprtna9ppad8 X-HE-Tag: 1666070769-678932 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 "cpus" for cpu mask and "cpus_list" for cpu list. For example, in my system, $ cat /sys/devices/system/cpu/cpu2/topology/core_cpus 0,00100004 $ cat /sys/devices/system/cpu/cpu2/topology/core_cpus_list 2,20 It looks reasonable to use "nodes" for node mask and "nodes_list" 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 --- 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..af07e166f559 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/nodes_list 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. + nodes_list: NUMA nodes that are part of this memory tier. diff --git a/mm/memory-tiers.c b/mm/memory-tiers.c index f116b7b6333e..8dbfe9ec87d5 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 nodes_list_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(nodes_list); static struct attribute *memtier_dev_attrs[] = { - &dev_attr_nodes.attr, + &dev_attr_nodes_list.attr, NULL };