Re: [HMM v16 04/15] mm/ZONE_DEVICE/unaddressable: add support for un-addressable device memory v2

2017-01-16 Thread Dan Williams
On Mon, Jan 16, 2017 at 6:00 PM, Jerome Glisse wrote: > On Mon, Jan 16, 2017 at 04:58:24PM -0800, Dan Williams wrote: >> On Mon, Jan 16, 2017 at 12:13 PM, Jerome Glisse wrote: >> > On Mon, Jan 16, 2017 at 11:31:39AM -0800, Dan Williams wrote: >> [..] >> >> >> dev_pagemap is only meant for get_use

Re: [HMM v16 04/15] mm/ZONE_DEVICE/unaddressable: add support for un-addressable device memory v2

2017-01-16 Thread Jerome Glisse
On Mon, Jan 16, 2017 at 04:58:24PM -0800, Dan Williams wrote: > On Mon, Jan 16, 2017 at 12:13 PM, Jerome Glisse wrote: > > On Mon, Jan 16, 2017 at 11:31:39AM -0800, Dan Williams wrote: > [..] > >> >> dev_pagemap is only meant for get_user_pages() to do lookups of ptes > >> >> with _PAGE_DEVMAP and

Re: [HMM v16 04/15] mm/ZONE_DEVICE/unaddressable: add support for un-addressable device memory v2

2017-01-16 Thread Dan Williams
On Mon, Jan 16, 2017 at 12:13 PM, Jerome Glisse wrote: > On Mon, Jan 16, 2017 at 11:31:39AM -0800, Dan Williams wrote: [..] >> >> dev_pagemap is only meant for get_user_pages() to do lookups of ptes >> >> with _PAGE_DEVMAP and take a reference against the hosting device.. >> > >> > And i want to b

Re: [HMM v16 04/15] mm/ZONE_DEVICE/unaddressable: add support for un-addressable device memory v2

2017-01-16 Thread Jerome Glisse
On Mon, Jan 16, 2017 at 11:31:39AM -0800, Dan Williams wrote: > On Mon, Jan 16, 2017 at 7:17 AM, Jerome Glisse wrote: > > On Sun, Jan 15, 2017 at 11:05:43PM -0800, Dan Williams wrote: > >> On Thu, Jan 12, 2017 at 8:30 AM, Jérôme Glisse wrote: > >> > This add support for un-addressable device memo

Re: [HMM v16 04/15] mm/ZONE_DEVICE/unaddressable: add support for un-addressable device memory v2

2017-01-16 Thread Dan Williams
On Mon, Jan 16, 2017 at 7:17 AM, Jerome Glisse wrote: > On Sun, Jan 15, 2017 at 11:05:43PM -0800, Dan Williams wrote: >> On Thu, Jan 12, 2017 at 8:30 AM, Jérôme Glisse wrote: >> > This add support for un-addressable device memory. Such memory is hotpluged >> > only so we can have struct page but

Re: [HMM v16 04/15] mm/ZONE_DEVICE/unaddressable: add support for un-addressable device memory v2

2017-01-16 Thread Jerome Glisse
On Sun, Jan 15, 2017 at 11:05:43PM -0800, Dan Williams wrote: > On Thu, Jan 12, 2017 at 8:30 AM, Jérôme Glisse wrote: > > This add support for un-addressable device memory. Such memory is hotpluged > > only so we can have struct page but we should never map them as such memory > > can not be acces

Re: [HMM v16 04/15] mm/ZONE_DEVICE/unaddressable: add support for un-addressable device memory v2

2017-01-15 Thread Dan Williams
On Thu, Jan 12, 2017 at 8:30 AM, Jérôme Glisse wrote: > This add support for un-addressable device memory. Such memory is hotpluged > only so we can have struct page but we should never map them as such memory > can not be accessed by CPU. For that reason it uses a special swap entry for > CPU pag

[HMM v16 04/15] mm/ZONE_DEVICE/unaddressable: add support for un-addressable device memory v2

2017-01-12 Thread Jérôme Glisse
This add support for un-addressable device memory. Such memory is hotpluged only so we can have struct page but we should never map them as such memory can not be accessed by CPU. For that reason it uses a special swap entry for CPU page table entry. This patch implement all the logic from special