lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAPL-u-9MBPuCrkHf1jzBApukpWCvzqFc-2f5ffEpBDZ3kE3tw@mail.gmail.com>
Date:   Mon, 17 Oct 2022 23:27:18 -0700
From:   Wei Xu <weixugc@...gle.com>
To:     Huang Ying <ying.huang@...el.com>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        "Aneesh Kumar K . V" <aneesh.kumar@...ux.ibm.com>,
        Alistair Popple <apopple@...dia.com>,
        Bharata B Rao <bharata@....com>,
        Dan Williams <dan.j.williams@...el.com>,
        Dave Hansen <dave.hansen@...el.com>,
        Davidlohr Bueso <dave@...olabs.net>,
        Hesham Almatary <hesham.almatary@...wei.com>,
        Jagdish Gediya <jvgediya.oss@...il.com>,
        Johannes Weiner <hannes@...xchg.org>,
        Jonathan Cameron <Jonathan.Cameron@...wei.com>,
        Michal Hocko <mhocko@...nel.org>,
        Tim Chen <tim.c.chen@...el.com>, Yang Shi <shy828301@...il.com>
Subject: Re: [RFC] memory tier, sysfs: rename attribute "nodes" to "nodes_list"

How about "nodelist", instead of "nodes_list"?  It is more concise and
follows the convention of:

/sys/devices/system/nodes/node0/cpulist

Wei

On Mon, Oct 17, 2022 at 10:26 PM Huang Ying <ying.huang@...el.com> wrote:
>
> 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" <ying.huang@...el.com>
> Cc: Aneesh Kumar K.V <aneesh.kumar@...ux.ibm.com>
> Cc: Alistair Popple <apopple@...dia.com>
> Cc: Bharata B Rao <bharata@....com>
> Cc: Dan Williams <dan.j.williams@...el.com>
> Cc: Dave Hansen <dave.hansen@...el.com>
> Cc: Davidlohr Bueso <dave@...olabs.net>
> Cc: Hesham Almatary <hesham.almatary@...wei.com>
> Cc: Jagdish Gediya <jvgediya.oss@...il.com>
> Cc: Johannes Weiner <hannes@...xchg.org>
> Cc: Jonathan Cameron <Jonathan.Cameron@...wei.com>
> Cc: Michal Hocko <mhocko@...nel.org>
> Cc: Tim Chen <tim.c.chen@...el.com>
> Cc: Wei Xu <weixugc@...gle.com>
> Cc: Yang Shi <shy828301@...il.com>
> ---
>  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 <linux-mm@...ck.org>
>  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
>  };
>
> --
> 2.35.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ