Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: Kyungsan Kim <ks0204.kim@samsung.com>, <fvdl@google.com>
Cc: <lsf-pc@lists.linux-foundation.org>, <linux-mm@kvack.org>,
	<linux-fsdevel@vger.kernel.org>, <linux-cxl@vger.kernel.org>,
	<a.manzanares@samsung.com>, <viacheslav.dubeyko@bytedance.com>,
	<dan.j.williams@intel.com>, <seungjun.ha@samsung.com>,
	<wj28.lee@samsung.com>
Subject: RE: Re: RE: FW: [LSF/MM/BPF TOPIC] SMDK inspired MM changes for CXL
Date: Tue, 4 Apr 2023 22:00:03 -0700	[thread overview]
Message-ID: <642d0053afc07_21a8294b7@dwillia2-xfh.jf.intel.com.notmuch> (raw)
In-Reply-To: <20230405020631.413965-1-ks0204.kim@samsung.com>

Kyungsan Kim wrote:
> Hi Frank, 
> Thank you for your interest on this topic and remaining your opinion.
> 
> >On Fri, Mar 31, 2023 at 6:42���AM Matthew Wilcox <willy@infradead.org> wrote:
> >>
> >> On Fri, Mar 31, 2023 at 08:42:20PM +0900, Kyungsan Kim wrote:
> >> > Given our experiences/design and industry's viewpoints/inquiries,
> >> > I will prepare a few slides in the session to explain
> >> >   1. Usecase - user/kernespace memory tiering for near/far placement, memory virtualization between hypervisor/baremetal OS
> >> >   2. Issue - movability(movable/unmovable), allocation(explicit/implicit), migration(intented/unintended)
> >> >   3. HW - topology(direct, switch, fabric), feature(pluggability,error-handling,etc)
> >>
> >> I think you'll find everybody else in the room understands these issues
> >> rather better than you do.  This is hardly the first time that we've
> >> talked about CXL, and CXL is not the first time that people have
> >> proposed disaggregated memory, nor heterogenous latency/bandwidth
> >> systems.  All the previous attempts have failed, and I expect this
> >> one to fail too.  Maybe there's something novel that means this time
> >> it really will work, so any slides you do should focus on that.
> >>
> >> A more profitable discussion might be:
> >>
> >> 1. Should we have the page allocator return pages from CXL or should
> >>    CXL memory be allocated another way?
> >> 2. Should there be a way for userspace to indicate that it prefers CXL
> >>    memory when it calls mmap(), or should it always be at the discretion
> >>    of the kernel?
> >> 3. Do we continue with the current ZONE_DEVICE model, or do we come up
> >>    with something new?
> >>
> >>
> >
> >Point 2 is what I proposed talking about here:
> >https://lore.kernel.org/linux-mm/a80a4d4b-25aa-a38a-884f-9f119c03a1da@google.com/T/
> >
> >With the current cxl-as-numa-node model, an application can express a
> >preference through mbind(). But that also means that mempolicy and
> >madvise (e.g. MADV_COLD) are starting to overlap if the intention is
> >to use cxl as a second tier for colder memory.  Are these the right
> >abstractions? Might it be more flexible to attach properties to memory
> >ranges, and have applications hint which properties they prefer?
> 
> We also think more userspace hints would be meaningful for diverse purposes of application.
> Specific intefaces are need to be discussed, though.
> 
> FYI in fact, we expanded mbind() and set_mempolicy() as well to explicitly bind DDR/CXL.
>   - mbind(,,MPOL_F_ZONE_EXMEM / MPOL_F_ZONE_NOEXMEM) 
>   - set_mempolicy(,,MPOL_F_ZONE_EXMEM / MPOL_F_ZONE_NOEXMEM)
> madvise() is also a candidate to express tiering intention.

Need to be careful to explain why node numbers are not sufficient,
because the need for new userspace ABI is a high bar.

Recall that ZONE id bits and NUMA id bits are both coming from
page->flags:

#define NODES_PGSHIFT           (NODES_PGOFF * (NODES_WIDTH != 0))
#define ZONES_PGSHIFT           (ZONES_PGOFF * (ZONES_WIDTH != 0))
#define ZONES_MASK              ((1UL << ZONES_WIDTH) - 1)
#define NODES_MASK              ((1UL << NODES_WIDTH) - 1)

So when people declare that they are on "team ZONE" or "team NUMA" for
this solution they are both on "team page->flags".

Also have a look at the HMEM_REPORTING [1] interface and how it
enumerates performance properties from initiator nodes to target nodes.
There's no similar existing ABI for enumerating the performance of a
ZONE. This is just to point out the momentum behind numbers in
NODES_MASK having more meaning for conveying policy and enumerating
performance than numbers in ZONES_MASK.

[1]: https://www.kernel.org/doc/html/latest/admin-guide/mm/numaperf.html


  reply	other threads:[~2023-04-05  5:00 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20230221014114epcas2p1687db1d75765a8f9ed0b3495eab1154d@epcas2p1.samsung.com>
2023-02-21  1:41 ` [LSF/MM/BPF TOPIC] SMDK inspired MM changes for CXL Kyungsan Kim
2023-02-27 23:14   ` Dan Williams
2023-02-28  4:35     ` Kyungsan Kim
2023-03-03  6:07   ` Huang, Ying
2023-03-22  4:33     ` FW: " Kyungsan Kim
2023-03-22 22:03       ` Dan Williams
2023-03-23 10:51         ` RE(2): " Kyungsan Kim
2023-03-23 12:25           ` David Hildenbrand
2023-03-24  9:09             ` RE(4): " Kyungsan Kim
2023-03-24  9:12               ` David Hildenbrand
2023-03-24  9:27                 ` RE(2): " Kyungsan Kim
2023-03-24  9:30                   ` David Hildenbrand
2023-03-24  9:50                     ` RE(3): " Kyungsan Kim
2023-03-24 13:08                       ` Jørgen Hansen
2023-03-24 22:33                         ` David Hildenbrand
2023-03-31 11:42                           ` Kyungsan Kim
2023-03-31 13:42                             ` Matthew Wilcox
2023-03-31 15:56                               ` Frank van der Linden
2023-04-03  8:34                                 ` David Hildenbrand
2023-04-05  2:16                                   ` Kyungsan Kim
2023-04-05  2:06                                 ` Re: " Kyungsan Kim
2023-04-05  5:00                                   ` Dan Williams [this message]
2023-04-05  2:01                               ` Kyungsan Kim
2023-04-05  3:11                                 ` Matthew Wilcox
2023-04-03  8:28                             ` David Hildenbrand
2023-04-05  2:09                               ` Kyungsan Kim
2023-03-31 11:31                         ` RE: RE(3): " Kyungsan Kim
2023-03-24  0:41           ` RE(2): " Huang, Ying
2023-03-24  8:48             ` RE(4): " Kyungsan Kim
2023-03-24 13:46               ` Gregory Price
2023-03-31 11:34                 ` Kyungsan Kim
2023-03-31 15:53                   ` Gregory Price
2023-04-05  2:02                     ` Kyungsan Kim
2023-03-24 14:55           ` RE(2): " Matthew Wilcox
2023-03-24 17:49             ` Matthew Wilcox
2023-03-31 11:37               ` Kyungsan Kim
2023-03-31 12:54                 ` Matthew Wilcox
2023-04-05  2:00                   ` Kyungsan Kim
2023-04-05  4:48                     ` Dan Williams
2023-04-05 18:12                       ` Matthew Wilcox
2023-04-05 19:42                         ` Dan Williams
2023-04-06 12:27                           ` David Hildenbrand
2023-04-07  9:30                             ` Kyungsan Kim
2023-03-31 11:38               ` Re: RE(2): " Kyungsan Kim
2023-03-26  7:21           ` Mike Rapoport
2023-03-30 22:03             ` Dragan Stancevic
2023-04-03  8:44               ` Mike Rapoport
2023-04-04  4:27                 ` Dragan Stancevic
2023-04-04  6:47                   ` Huang, Ying
2023-04-06 22:27                     ` Dragan Stancevic
2023-04-07  0:58                       ` Huang, Ying
2023-04-07  9:29                         ` Kyungsan Kim
2023-04-07 14:35                         ` Dragan Stancevic
2023-04-05 10:18                   ` Kyungsan Kim
2023-03-31 11:45             ` RE: RE(2): " Kyungsan Kim
2023-04-04  8:31               ` Mike Rapoport
2023-04-04 17:58                 ` Adam Manzanares
2023-04-01 10:51                   ` Gregory Price
2023-04-04 18:59                     ` [External] " Viacheslav A.Dubeyko
2023-04-01 11:51                       ` Gregory Price
2023-04-04 21:09                         ` Viacheslav A.Dubeyko
2023-04-04 23:51                         ` Dan Williams
2023-04-05  2:34                           ` Gregory Price
2023-04-05 10:18                         ` Kyungsan Kim
2023-03-30 22:02   ` Dragan Stancevic
2023-03-31 11:46     ` Kyungsan Kim
2023-04-14  8:41   ` FW: " Kyungsan Kim
2023-05-09 18:45     ` MTK

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=642d0053afc07_21a8294b7@dwillia2-xfh.jf.intel.com.notmuch \
    --to=dan.j.williams@intel.com \
    --cc=a.manzanares@samsung.com \
    --cc=fvdl@google.com \
    --cc=ks0204.kim@samsung.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lsf-pc@lists.linux-foundation.org \
    --cc=seungjun.ha@samsung.com \
    --cc=viacheslav.dubeyko@bytedance.com \
    --cc=wj28.lee@samsung.com \
    /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