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: 5956 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp11910wrs; Wed, 19 Oct 2022 18:52:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6RCrK/d2HpMa4UFbzDwnmNFWXJAEtQa8Ih8GBJ6Rjt9l5deFW2L61EccpT0pjv+7py/1MN X-Received: by 2002:a17:906:cc0f:b0:78e:1208:8796 with SMTP id ml15-20020a170906cc0f00b0078e12088796mr8968627ejb.601.1666230751976; Wed, 19 Oct 2022 18:52:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666230751; cv=none; d=google.com; s=arc-20160816; b=NZXKMe7Uh/IyqklKg1gOcNDHqAhCU/7wLjXnjyW6Lc3xupvppOZsxuHOt6O7MhXRyn tHW+DQ1gYweML5YJkXLDL6+ZVO8zNQf12wKxN7nhFimEnqhgI3Q31n5HRGAQEwvIpF4k VsAOEB97re3h2kMxRmdkMwkY5TgXfpxAER8JAu5/qNMEiffUIotSX/rcrsc2jfDBdehY zyCQpZpfrgJN/C7xZ1EAIETsLoUvQMvS32USVztrRmsIje33KD8IfsRJHh5kZfA1kwQy SVo4SaN9rSNzKBeQ9lbV3nl8kgB9mCRKeqfCSQzzxTbo4PykUBYb8X9F7kzPQuSTGEY+ PV1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=bmo0y/Wr+Ne5ZmH3Qd5cQJqPZgkRevPDdp6aph+/XsE=; b=PHKnqrLR54taZ1gM44+OqKTVVZT37m1QkjekSioVwJg7qNGKAXmzQ4hVuCT+/0qxAB wGcmaz42YJWvymev8lc/WzTmm5tYLdhyxe+uKbwZy7U7KlzYrsEGkNkEvfo9+FDuXWpL nV0Oe5FFBCmdbC1ghuZpA+8IxwDC3n35G36T5QzeBm386aZpaVjvWcezkMKgtCI+Hd7U iUqf81tGNoXMr1xE5WKdg/Nfwv64lsB3nC+Bq/CbMGbUOcAYpHsoM58v75mp2LX6En7S QDYbxvJH2SJcBCBDLA4psqWMpgzbmTaHKHoZtsYLK+khg1+B6ZoAjid+soXNMIPtqaO/ X6Eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=D+dVk04I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h9-20020a05640250c900b00458bc949b45si18589145edb.488.2022.10.19.18.52.07; Wed, 19 Oct 2022 18:52:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=D+dVk04I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231404AbiJTBve (ORCPT + 99 others); Wed, 19 Oct 2022 21:51:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230463AbiJTBvc (ORCPT ); Wed, 19 Oct 2022 21:51:32 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29971160ECA for ; Wed, 19 Oct 2022 18:51:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666230691; x=1697766691; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=jqVvHxPo050Zb28QPRhB5MKlDfuC+lZT57Gtdn8Tgy4=; b=D+dVk04IJhrjiVbY5hGN50z0dES/OQ4kdyuBdZqKHkt84J8qrCCXQ3M+ XHDIecGdniKW/kWnQdCdJbdOgOnu6LEN03QYaZmMF5Hjv4ROWqUtrR+OB /3SVKo3LLil3bKBau0rS0FZu+MPel3Ojgek0PO+DG8EWGrMfkr5Ji2BFj fWiXCXbE7B4XkFHtMk6DaX3wi5v1ZgVIqozH9Ce2L1YktUW7pK+o7PeKy K1v3PelaqAFo/DQU9Za9EFeKwGTdq66JEjk0n0rkGNOEWspPenSp4Egr0 PPggtfgRQv82Bp7F/mmm7gzzThuvT5n93AvGelIyfUNSX/yk1pk4qlF3p Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10505"; a="307679133" X-IronPort-AV: E=Sophos;i="5.95,196,1661842800"; d="scan'208";a="307679133" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.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 X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747169576833773429?= X-GMAIL-MSGID: =?utf-8?q?1747169576833773429?= 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 };