[dm-devel] [PATCH] vmalloc: introduce vmap_pfn for persistent memory

Dan Williams dan.j.williams at intel.com
Wed Nov 8 21:26:32 UTC 2017


On Wed, Nov 8, 2017 at 12:26 PM, Mikulas Patocka <mpatocka at redhat.com> wrote:
> On Wed, 8 Nov 2017, Christoph Hellwig wrote:
>
>> Can you start by explaining what you actually need the vmap for?
>
> It is possible to use lvm on persistent memory. You can create linear or
> striped logical volumes on persistent memory and these volumes still have
> the direct_access method, so they can be mapped with the function
> dax_direct_access().
>
> If we create logical volumes on persistent memory, the method
> dax_direct_access() won't return the whole device, it will return only a
> part. When dax_direct_access() returns the whole device, my driver just
> uses it without vmap. When dax_direct_access() return only a part of the
> device, my driver calls it repeatedly to get all the parts and then
> assembles the parts into a linear address space with vmap.

I know I proposed "call dax_direct_access() once" as a strawman for an
in-kernel driver user, but it's better to call it per access so you
can better stay in sync with base driver events like new media errors
and unplug / driver-unload. Either that, or at least have a plan how
to handle those events.




More information about the dm-devel mailing list