From: Balbir Singh <bsingharora@gmail.com>
To: John Hubbard <jhubbard@nvidia.com>,
linux-mm@kvack.org, akpm@linux-foundation.org
Cc: khandual@linux.vnet.ibm.com, benh@kernel.crashing.org,
aneesh.kumar@linux.vnet.ibm.com, paulmck@linux.vnet.ibm.com,
srikar@linux.vnet.ibm.com, haren@linux.vnet.ibm.com,
jglisse@redhat.com, mgorman@techsingularity.net,
mhocko@kernel.org, arbab@linux.vnet.ibm.com, vbabka@suse.cz,
cl@linux.com
Subject: Re: [RFC 0/4] RFC - Coherent Device Memory (Not for inclusion)
Date: Tue, 02 May 2017 17:23:24 +1000 [thread overview]
Message-ID: <1493709804.15044.9.camel@gmail.com> (raw)
In-Reply-To: <9e3b8b57-abd3-67cf-7c5c-a5cccc93f4b7@nvidia.com>
On Mon, 2017-05-01 at 22:47 -0700, John Hubbard wrote:
>
> On 05/01/2017 06:29 PM, Balbir Singh wrote:
> > On Mon, 2017-05-01 at 13:41 -0700, John Hubbard wrote:
> > > On 04/19/2017 12:52 AM, Balbir Singh wrote:
> > > > This is a request for comments on the discussed approaches
> > > > for coherent memory at mm-summit (some of the details are at
> > > > https://lwn.net/Articles/717601/). The latest posted patch
> > > > series is at https://lwn.net/Articles/713035/. I am reposting
> > > > this as RFC, Michal Hocko suggested using HMM for CDM, but
> > > > we believe there are stronger reasons to use the NUMA approach.
> > > > The earlier patches for Coherent Device memory were implemented
> > > > and designed by Anshuman Khandual.
> > > >
> > >
> > > Hi Balbir,
> > >
> > > Although I think everyone agrees that in the [very] long term, these
> > > hardware-coherent nodes probably want to be NUMA nodes, in order to decide what to
> > > code up over the next few years, we need to get a clear idea of what has to be done
> > > for each possible approach.
> > >
> > > Here, the CDM discussion is falling just a bit short, because it does not yet
> > > include the whole story of what we would need to do. Earlier threads pointed this
> > > out: the idea started as a large patchset RFC, but then, "for ease of review", it
> > > got turned into a smaller RFC, which loses too much context.
> >
> > Hi, John
> >
> > I thought I explained the context, but I'll try again. I see the whole solution
> > as a composite of the following primitives:
> >
> > 1. Enable hotplug of CDM nodes
> > 2. Isolation of CDM memory
> > 3. Migration to/from CDM memory
> > 4. Performance enhancements for migration
> >
>
> So, there is a little more than the above required, which is why I made that short
> list. I'm in particular concerned about the various system calls that userspace can
> make to control NUMA memory, and the device drivers will need notification (probably
> mmu_notifiers, I guess), and once they get notification, in many cases they'll need
> some way to deal with reverse mapping.
Are you suggesting that the system calls user space should be audited to
check if they should be used with a CDM device? I would
think a whole lot of this should be transparent to user space, unless it opts
in to using CDM and explictly wants to allocate and free memory -- the whole
isolation premise. w.r.t device drivers are you suggesting that the device
driver needs to know the state of each page -- free/in-use? Reverse mapping
for migration?
>
> HMM provides all of that support, so it needs to happen here, too.
>
>
>
> > The RFC here is for (2) above. (3) is handled by HMM and (4) is being discussed
> > in the community. I think the larger goals are same as HMM, except that we
> > don't need unaddressable memory, since the memory is cache coherent.
> >
> > >
> > > So, I'd suggest putting together something more complete, so that it can be fairly
> > > compared against the HMM-for-hardware-coherent-nodes approach.
> > >
> >
> > Since I intend to reuse bits of HMM, I am not sure if I want to repost those
> > patches as a part of my RFC. I hope my answers make sense, the goal is to
> > reuse as much of what is available. From a user perspective
>
> It's hard to keep track of what the plan is, so explaining exactly what you're doing
> helps.
>
Fair enough, I hope I answered the questions?
> >
> > 1. We see no new interface being added in either case, the programming model
> > would differ though
> > 2. We expect the programming model to be abstracted behind a user space
> > framework, potentially like CUDA or CXL
> >
> >
> > >
> > > > Jerome posted HMM-CDM at https://lwn.net/Articles/713035/.
> > > > The patches do a great deal to enable CDM with HMM, but we
> > > > still believe that HMM with CDM is not a natural way to
> > > > represent coherent device memory and the mm will need
> > > > to be audited and enhanced for it to even work.
> > >
> > > That is also true for the CDM approach. Specifically, in order for this to be of any
> > > use to device drivers, we'll need the following:
> > >
> >
> > Since Reza answered these questions, I'll skip them in this email
>
> Yes, but he skipped over the rmap question, which I think is an important one.
>
If it is for migration, then we are going to rely on changes from HMM-CDM.
How does HMM deal with the rmap case? I presume it is not required for
unaddressable memory?
Balbir Singh.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2017-05-02 7:23 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-19 7:52 [RFC 0/4] RFC - Coherent Device Memory (Not for inclusion) Balbir Singh
2017-04-19 7:52 ` [RFC 1/4] mm: create N_COHERENT_MEMORY Balbir Singh
2017-04-27 18:42 ` Reza Arbab
2017-04-28 5:07 ` Balbir Singh
2017-04-19 7:52 ` [RFC 2/4] arch/powerpc/mm: add support for coherent memory Balbir Singh
2017-04-19 7:52 ` [RFC 3/4] mm: Integrate N_COHERENT_MEMORY with mempolicy and the rest of the system Balbir Singh
2017-04-19 7:52 ` [RFC 4/4] mm: Add documentation for coherent memory Balbir Singh
2017-04-19 19:02 ` [RFC 0/4] RFC - Coherent Device Memory (Not for inclusion) Christoph Lameter
2017-04-20 1:25 ` Balbir Singh
2017-04-20 15:29 ` Christoph Lameter
2017-04-20 21:26 ` Benjamin Herrenschmidt
2017-04-21 16:13 ` Christoph Lameter
2017-04-21 21:15 ` Benjamin Herrenschmidt
2017-04-24 13:57 ` Christoph Lameter
2017-04-24 0:20 ` Balbir Singh
2017-04-24 14:00 ` Christoph Lameter
2017-04-25 0:52 ` Balbir Singh
2017-05-01 20:41 ` John Hubbard
2017-05-01 21:04 ` Reza Arbab
2017-05-01 21:56 ` John Hubbard
2017-05-01 23:51 ` Reza Arbab
2017-05-01 23:58 ` John Hubbard
2017-05-02 0:04 ` Reza Arbab
2017-05-02 1:29 ` Balbir Singh
2017-05-02 5:47 ` John Hubbard
2017-05-02 7:23 ` Balbir Singh [this message]
2017-05-02 17:50 ` John Hubbard
2017-05-02 14:36 ` Michal Hocko
2017-05-04 5:26 ` Balbir Singh
2017-05-04 12:52 ` Michal Hocko
2017-05-04 15:49 ` Benjamin Herrenschmidt
2017-05-04 17:33 ` Dave Hansen
2017-05-05 3:17 ` Balbir Singh
2017-05-05 14:51 ` Dave Hansen
2017-05-05 7:49 ` Benjamin Herrenschmidt
2017-05-05 14:52 ` Michal Hocko
2017-05-05 15:57 ` Benjamin Herrenschmidt
2017-05-05 17:48 ` Jerome Glisse
2017-05-05 17:59 ` Benjamin Herrenschmidt
2017-05-09 11:36 ` Michal Hocko
2017-05-09 13:43 ` Benjamin Herrenschmidt
2017-05-15 12:55 ` Michal Hocko
2017-05-15 15:53 ` Christoph Lameter
2017-05-10 23:04 ` Balbir Singh
2017-05-09 7:51 ` Balbir Singh
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=1493709804.15044.9.camel@gmail.com \
--to=bsingharora@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=arbab@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=cl@linux.com \
--cc=haren@linux.vnet.ibm.com \
--cc=jglisse@redhat.com \
--cc=jhubbard@nvidia.com \
--cc=khandual@linux.vnet.ibm.com \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=srikar@linux.vnet.ibm.com \
--cc=vbabka@suse.cz \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.