lkml.org 
[lkml]   [2022]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [RFC PATCH rdma-next 01/10] RDMA: mr: Introduce is_pmem
    Date
    "Li, Zhijian" <lizhijian@cn.fujitsu.com> writes:

    > Copied to nvdimm list
    >
    > Thanks
    >
    > Zhijian
    >
    >
    > on 2022/1/6 14:12, Li Zhijian wrote:
    >>
    >> Add Dan to the party :)
    >>
    >> May i know whether there is any existing APIs to check whether
    >> a va/page backs to a nvdimm/pmem ?

    I don't know of one. You could try walk_system_ram_range looking for
    IORES_DESC_PERSISTENT_MEMORY, but that's not very efficient.

    >>> You need to get Dan to check this out, but I'm pretty sure this should
    >>> be more like this:
    >>>
    >>> if (is_zone_device_page(page) && page->pgmap->type ==
    >>> MEMORY_DEVICE_FS_DAX)

    You forgot MEMORY_DEVICE_GENERIC. However, this doesn't guarantee the
    memory belongs to persistent memory, only that it is direct access
    capable.

    Dan, any ideas?

    -Jeff

    \
     
     \ /
      Last update: 2022-01-27 23:27    [W:3.271 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site