Re: [PATCH] mm/device-public-memory: Enable move_pages() to stat device memory
From: Reza Arbab
Date: Fri Sep 22 2017 - 17:01:38 EST
On Fri, Sep 22, 2017 at 08:31:57PM +0000, Reza Arbab wrote:
On Fri, Sep 22, 2017 at 08:13:56PM +0000, Reza Arbab wrote:
The move_pages() syscall can be used to find the numa node where a page
currently resides. This is not working for device public memory pages,
which erroneously report -EFAULT (unmapped or zero page).
Argh. Please disregard this patch.
My test setup has a chunk of system memory carved out as pretend
device public memory, to experiment with. Of course the real thing has
no numa node!
On third thought, yes it does!
static int hmm_devmem_pages_create(struct hmm_devmem *devmem)
{
:
nid = dev_to_node(device);
if (nid < 0)
nid = numa_mem_id();
:
if (devmem->pagemap.type == MEMORY_DEVICE_PUBLIC)
ret = arch_add_memory(nid, align_start, align_size, false);
:
}
So now I think the patch may be right after all. Please un-disregard it.
Regard it? Whatever.
--
Reza Arbab