Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1740016
| From | Michal Hocko <mhocko@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] mm/device-public-memory: Enable move_pages() to stat device memory |
| Date | 2017-09-26 18:40 +0200 |
| Message-ID | <uu13Q-7af-9@gated-at.bofh.it> (permalink) |
| References | <usCAy-24P-21@gated-at.bofh.it> <utYfE-5n5-11@gated-at.bofh.it> <utZln-62J-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue 26-09-17 09:47:10, Reza Arbab wrote: > On Tue, Sep 26, 2017 at 01:37:07PM +0000, Michal Hocko wrote: > > On Fri 22-09-17 15:13:56, 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). > > > > > > Enable by adding a FOLL_DEVICE flag for follow_page(), which > > > move_pages() will use. This could be done unconditionally, but adding a > > > flag seems like a safer change. > > > > I do not understand purpose of this patch. What is the numa node of a > > device memory? > > Well, using hmm_devmem_pages_create() it is added to this node: > > nid = dev_to_node(device); > if (nid < 0) > nid = numa_mem_id(); OK, but do all the HMM devices have concept of NUMA affinity? From the code you are pasting they do not have to... > I understand it's minimally useful information to userspace, but the memory > does have a nid and move_pages() is supposed to be able to return what that > is. I ran into this using a testcase which tries to verify that user > addresses were correctly migrated to coherent device memory. > > That said, I'm okay with dropping this if you don't think it's worthwhile. I am just worried that we allow information which is not generally sensible and I am also not sure what the userspace can actually do with that information. -- Michal Hocko SUSE Labs
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] mm/device-public-memory: Enable move_pages() to stat device memory Reza Arbab <arbab@linux.vnet.ibm.com> - 2017-09-22 22:20 +0200
Re: [PATCH] mm/device-public-memory: Enable move_pages() to stat device memory Reza Arbab <arbab@linux.vnet.ibm.com> - 2017-09-22 22:40 +0200
Re: [PATCH] mm/device-public-memory: Enable move_pages() to stat device memory Reza Arbab <arbab@linux.vnet.ibm.com> - 2017-09-22 23:10 +0200
Re: [PATCH] mm/device-public-memory: Enable move_pages() to stat device memory Michal Hocko <mhocko@kernel.org> - 2017-09-26 15:40 +0200
Re: [PATCH] mm/device-public-memory: Enable move_pages() to stat device memory Reza Arbab <arbab@linux.vnet.ibm.com> - 2017-09-26 16:50 +0200
Re: [PATCH] mm/device-public-memory: Enable move_pages() to stat device memory Jerome Glisse <jglisse@redhat.com> - 2017-09-26 18:30 +0200
Re: [PATCH] mm/device-public-memory: Enable move_pages() to stat device memory Michal Hocko <mhocko@kernel.org> - 2017-09-26 18:40 +0200
Re: [PATCH] mm/device-public-memory: Enable move_pages() to stat device memory Reza Arbab <arbab@linux.vnet.ibm.com> - 2017-09-26 20:40 +0200
csiph-web