[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHbLzkqhX-=Zs=XdR4crHYBHOdgR1zsAL+o3b8YUfe+7PB7PPw@mail.gmail.com>
Date: Tue, 30 Oct 2018 22:11:30 -0700
From: Yang Shi <shy828301@...il.com>
To: dave.hansen@...ux.intel.com
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
dan.j.williams@...el.com, dave.jiang@...el.com, zwisler@...nel.org,
vishal.l.verma@...el.com, thomas.lendacky@....com,
Andrew Morton <akpm@...ux-foundation.org>,
Michal Hocko <mhocko@...e.com>, linux-nvdimm@...ts.01.org,
Linux MM <linux-mm@...ck.org>,
Huang Ying <ying.huang@...el.com>, fengguang.wu@...el.com
Subject: Re: [PATCH 0/9] Allow persistent memory to be used like normal RAM
On Mon, Oct 22, 2018 at 1:18 PM Dave Hansen <dave.hansen@...ux.intel.com> wrote:
>
> Persistent memory is cool. But, currently, you have to rewrite
> your applications to use it. Wouldn't it be cool if you could
> just have it show up in your system like normal RAM and get to
> it like a slow blob of memory? Well... have I got the patch
> series for you!
>
> This series adds a new "driver" to which pmem devices can be
> attached. Once attached, the memory "owned" by the device is
> hot-added to the kernel and managed like any other memory. On
> systems with an HMAT (a new ACPI table), each socket (roughly)
> will have a separate NUMA node for its persistent memory so
> this newly-added memory can be selected by its unique NUMA
> node.
Could you please elaborate this? I'm supposed you mean the pmem will
be a separate NUMA node, right?
I would like to try the patches on real hardware, any prerequisite is needed?
Thanks,
Yang
>
> This is highly RFC, and I really want the feedback from the
> nvdimm/pmem folks about whether this is a viable long-term
> perversion of their code and device mode. It's insufficiently
> documented and probably not bisectable either.
>
> Todo:
> 1. The device re-binding hacks are ham-fisted at best. We
> need a better way of doing this, especially so the kmem
> driver does not get in the way of normal pmem devices.
> 2. When the device has no proper node, we default it to
> NUMA node 0. Is that OK?
> 3. We muck with the 'struct resource' code quite a bit. It
> definitely needs a once-over from folks more familiar
> with it than I.
> 4. Is there a better way to do this than starting with a
> copy of pmem.c?
>
> Here's how I set up a system to test this thing:
>
> 1. Boot qemu with lots of memory: "-m 4096", for instance
> 2. Reserve 512MB of physical memory. Reserving a spot a 2GB
> physical seems to work: memmap=512M!0x0000000080000000
> This will end up looking like a pmem device at boot.
> 3. When booted, convert fsdax device to "device dax":
> ndctl create-namespace -fe namespace0.0 -m dax
> 4. In the background, the kmem driver will probably bind to the
> new device.
> 5. Now, online the new memory sections. Perhaps:
>
> grep ^MemTotal /proc/meminfo
> for f in `grep -vl online /sys/devices/system/memory/*/state`; do
> echo $f: `cat $f`
> echo online > $f
> grep ^MemTotal /proc/meminfo
> done
>
> Cc: Dan Williams <dan.j.williams@...el.com>
> Cc: Dave Jiang <dave.jiang@...el.com>
> Cc: Ross Zwisler <zwisler@...nel.org>
> Cc: Vishal Verma <vishal.l.verma@...el.com>
> Cc: Tom Lendacky <thomas.lendacky@....com>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Michal Hocko <mhocko@...e.com>
> Cc: linux-nvdimm@...ts.01.org
> Cc: linux-kernel@...r.kernel.org
> Cc: linux-mm@...ck.org
> Cc: Huang Ying <ying.huang@...el.com>
> Cc: Fengguang Wu <fengguang.wu@...el.com>
>
Powered by blists - more mailing lists