linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
To: Ross Zwisler <ross.zwisler-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Cc: Michal Hocko <mhocko-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	"Anaczkowski,
	Lukasz"
	<lukasz.anaczkowski-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"Box,
	David E" <david.e.box-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"Kogut,
	Jaroslaw"
	<Jaroslaw.Kogut-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"Koss,
	Marcin" <marcin.koss-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"Koziej,
	Artur" <artur.koziej-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"Lahtinen,
	Joonas" <joonas.lahtinen-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"Moore,
	Robert" <robert.moore-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"Nachimuthu,
	Murugasamy"
	<murugasamy.nachimuthu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"Odzioba,
	Lukasz" <lukasz.odzioba-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"Rafael J. Wysocki"
	<rafael.j.wysocki-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"Rafael J. Wysocki" <rjw-LthD3rsA81gm4RdzfppkhA@public.gmane.org>,
	"Schmauss,
	Erik" <erik.schmauss-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"Verma,
	Vishal L"
	<vishal.l.verma-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"Zheng, Lv" <lv.zheng-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Andrew Morton
	<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
	Balbir Singh <bsingharora@gm>
Subject: Re: [PATCH v3 0/3] create sysfs representation of ACPI HMAT
Date: Wed, 20 Dec 2017 10:19:37 -0800	[thread overview]
Message-ID: <20171220181937.GB12236@bombadil.infradead.org> (raw)
In-Reply-To: <20171218203547.GA2366-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>

On Mon, Dec 18, 2017 at 01:35:47PM -0700, Ross Zwisler wrote:
> What I'm hoping to do with this series is to just provide a sysfs
> representation of the HMAT so that applications can know which NUMA nodes to
> select with existing utilities like numactl.  This series does not currently
> alter any kernel behavior, it only provides a sysfs interface.
> 
> Say for example you had a system with some high bandwidth memory (HBM), and
> you wanted to use it for a specific application.  You could use the sysfs
> representation of the HMAT to figure out which memory target held your HBM.
> You could do this by looking at the local bandwidth values for the various
> memory targets, so:
> 
> 	# grep . /sys/devices/system/hmat/mem_tgt*/local_init/write_bw_MBps
> 	/sys/devices/system/hmat/mem_tgt2/local_init/write_bw_MBps:81920
> 	/sys/devices/system/hmat/mem_tgt3/local_init/write_bw_MBps:40960
> 	/sys/devices/system/hmat/mem_tgt4/local_init/write_bw_MBps:40960
> 	/sys/devices/system/hmat/mem_tgt5/local_init/write_bw_MBps:40960
> 
> and look for the one that corresponds to your HBM speed. (These numbers are
> made up, but you get the idea.)

Presumably ACPI-based platforms will not be the only ones who have the
ability to expose different bandwidth memories in the future.  I think
we need a platform-agnostic way ... right, PowerPC people?

I don't know what the right interface is, but my laptop has a set of
/sys/devices/system/memory/memoryN/ directories.  Perhaps this is the
right place to expose write_bw (etc).

> Once you know the NUMA node of your HBM, you can figure out the NUMA node of
> it's local initiator:
> 
> 	# ls -d /sys/devices/system/hmat/mem_tgt2/local_init/mem_init*
> 	/sys/devices/system/hmat/mem_tgt2/local_init/mem_init0
> 
> So, in our made-up example our HBM is located in numa node 2, and the local
> CPU for that HBM is at numa node 0.

initiator is a CPU?  I'd have expected you to expose a memory controller
abstraction rather than re-use storage terminology.

  parent reply	other threads:[~2017-12-20 18:19 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20171214021019.13579-1-ross.zwisler@linux.intel.com>
2017-12-14 13:00 ` [PATCH v3 0/3] create sysfs representation of ACPI HMAT Michal Hocko
     [not found]   ` <20171214130032.GK16951-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2017-12-18 20:35     ` Ross Zwisler
2017-12-20 16:41       ` Ross Zwisler
     [not found]         ` <20171220164107.GA29103-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-12-21 13:18           ` Michal Hocko
     [not found]       ` <20171218203547.GA2366-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-12-20 18:19         ` Matthew Wilcox [this message]
2017-12-20 20:22           ` Dave Hansen
2017-12-20 21:16             ` Matthew Wilcox
2017-12-20 21:24               ` Ross Zwisler
2017-12-20 22:29                 ` Dan Williams
     [not found]                   ` <CAPcyv4gTknp=0yQnVrrB5Ui+mJE_x-wdkV86UD4hsYnx3CAjfA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-12-20 22:41                     ` Ross Zwisler
2017-12-21 20:31                       ` Brice Goglin
2017-12-22 22:53                         ` Dan Williams
2017-12-22 23:22                           ` Ross Zwisler
2017-12-22 23:57                             ` Dan Williams
     [not found]                               ` <CAPcyv4j95rWmFM5NDvoRJakwVE5YUgcipQW2Ju+40+FD6vYs+Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-12-23  1:14                                 ` Rafael J. Wysocki
     [not found]                           ` <CAPcyv4j9shdJFrvADa=qW4L-jPJJ4S_TJc_c=aRoW3EmSCCChQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-12-27  9:10                             ` Brice Goglin
     [not found]                               ` <71317994-af66-a1b2-4c7a-86a03253cf62-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-12-30  6:58                                 ` Matthew Wilcox
     [not found]                                   ` <20171230065845.GD27959-PfSpb0PWhxZc2C7mugBRk2EX/6BAtgUQ@public.gmane.org>
2017-12-30  9:19                                     ` Brice Goglin
2017-12-20 21:13           ` Ross Zwisler
2017-12-21  1:41             ` Elliott, Robert (Persistent Memory)
2017-12-22 21:46               ` Ross Zwisler
2017-12-21 12:50           ` Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171220181937.GB12236@bombadil.infradead.org \
    --to=willy-wegcikhe2lqwvfeawa7xhq@public.gmane.org \
    --cc=Jaroslaw.Kogut-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=artur.koziej-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=bsingharora@gm \
    --cc=david.e.box-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=erik.schmauss-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=joonas.lahtinen-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lukasz.anaczkowski-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=lukasz.odzioba-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=lv.zheng-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=marcin.koss-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=mhocko-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=murugasamy.nachimuthu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=rafael.j.wysocki-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=rjw-LthD3rsA81gm4RdzfppkhA@public.gmane.org \
    --cc=robert.moore-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=ross.zwisler-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=vishal.l.verma-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).