Re: [HMM 07/16] mm/migrate: new memory migration helper for use with device memory v4

2017-03-17 Thread John Hubbard
On 03/16/2017 09:51 PM, Balbir Singh wrote: [...] So this is what I ended up with, a quick fix for the 32 bit build failures Date: Fri, 17 Mar 2017 15:42:52 +1100 Subject: [PATCH] mm/hmm: Fix build on 32 bit systems Fix build breakage of hmm-v18 in the current mmotm by making the migrate_vma()

Re: [HMM 07/16] mm/migrate: new memory migration helper for use with device memory v4

2017-03-17 Thread John Hubbard
On 03/16/2017 09:51 PM, Balbir Singh wrote: [...] So this is what I ended up with, a quick fix for the 32 bit build failures Date: Fri, 17 Mar 2017 15:42:52 +1100 Subject: [PATCH] mm/hmm: Fix build on 32 bit systems Fix build breakage of hmm-v18 in the current mmotm by making the migrate_vma()

Re: [HMM 07/16] mm/migrate: new memory migration helper for use with device memory v4

2017-03-16 Thread Balbir Singh
On 17/03/17 14:42, Balbir Singh wrote: >>> Or make the HMM Kconfig feature 64BIT only by making it depend on 64BIT? >>> >> >> Yes, that was my first reaction too, but these particular routines are >> aspiring to be generic routines--in fact, you have had an influence there, >> because these

Re: [HMM 07/16] mm/migrate: new memory migration helper for use with device memory v4

2017-03-16 Thread Balbir Singh
On 17/03/17 14:42, Balbir Singh wrote: >>> Or make the HMM Kconfig feature 64BIT only by making it depend on 64BIT? >>> >> >> Yes, that was my first reaction too, but these particular routines are >> aspiring to be generic routines--in fact, you have had an influence there, >> because these

Re: [HMM 07/16] mm/migrate: new memory migration helper for use with device memory v4

2017-03-16 Thread Balbir Singh
>> Or make the HMM Kconfig feature 64BIT only by making it depend on 64BIT? >> > > Yes, that was my first reaction too, but these particular routines are > aspiring to be generic routines--in fact, you have had an influence there, > because these might possibly help with NUMA migrations. :) >

Re: [HMM 07/16] mm/migrate: new memory migration helper for use with device memory v4

2017-03-16 Thread Balbir Singh
>> Or make the HMM Kconfig feature 64BIT only by making it depend on 64BIT? >> > > Yes, that was my first reaction too, but these particular routines are > aspiring to be generic routines--in fact, you have had an influence there, > because these might possibly help with NUMA migrations. :) >

Re: [HMM 07/16] mm/migrate: new memory migration helper for use with device memory v4

2017-03-16 Thread Andrew Morton
On Thu, 16 Mar 2017 21:52:23 -0400 (EDT) Jerome Glisse wrote: > The original intention was for it to be 64bit only, 32bit is a dying > species and before splitting out hmm_ prefix from this code and moving > it to be generic it was behind a 64bit flag. > > If latter one

Re: [HMM 07/16] mm/migrate: new memory migration helper for use with device memory v4

2017-03-16 Thread Andrew Morton
On Thu, 16 Mar 2017 21:52:23 -0400 (EDT) Jerome Glisse wrote: > The original intention was for it to be 64bit only, 32bit is a dying > species and before splitting out hmm_ prefix from this code and moving > it to be generic it was behind a 64bit flag. > > If latter one someone really care

Re: [HMM 07/16] mm/migrate: new memory migration helper for use with device memory v4

2017-03-16 Thread Jerome Glisse
> On 03/16/2017 05:45 PM, Balbir Singh wrote: > > On Fri, Mar 17, 2017 at 11:22 AM, John Hubbard wrote: > >> On 03/16/2017 04:05 PM, Andrew Morton wrote: > >>> > >>> On Thu, 16 Mar 2017 12:05:26 -0400 Jérôme Glisse > >>> wrote: > >>> > +static inline

Re: [HMM 07/16] mm/migrate: new memory migration helper for use with device memory v4

2017-03-16 Thread Jerome Glisse
> On 03/16/2017 05:45 PM, Balbir Singh wrote: > > On Fri, Mar 17, 2017 at 11:22 AM, John Hubbard wrote: > >> On 03/16/2017 04:05 PM, Andrew Morton wrote: > >>> > >>> On Thu, 16 Mar 2017 12:05:26 -0400 Jérôme Glisse > >>> wrote: > >>> > +static inline struct page

Re: [HMM 07/16] mm/migrate: new memory migration helper for use with device memory v4

2017-03-16 Thread John Hubbard
On 03/16/2017 05:45 PM, Balbir Singh wrote: On Fri, Mar 17, 2017 at 11:22 AM, John Hubbard wrote: On 03/16/2017 04:05 PM, Andrew Morton wrote: On Thu, 16 Mar 2017 12:05:26 -0400 Jérôme Glisse wrote: +static inline struct page

Re: [HMM 07/16] mm/migrate: new memory migration helper for use with device memory v4

2017-03-16 Thread John Hubbard
On 03/16/2017 05:45 PM, Balbir Singh wrote: On Fri, Mar 17, 2017 at 11:22 AM, John Hubbard wrote: On 03/16/2017 04:05 PM, Andrew Morton wrote: On Thu, 16 Mar 2017 12:05:26 -0400 Jérôme Glisse wrote: +static inline struct page *migrate_pfn_to_page(unsigned long mpfn) +{ + if (!(mpfn

Re: [HMM 07/16] mm/migrate: new memory migration helper for use with device memory v4

2017-03-16 Thread Balbir Singh
On Fri, Mar 17, 2017 at 11:22 AM, John Hubbard wrote: > On 03/16/2017 04:05 PM, Andrew Morton wrote: >> >> On Thu, 16 Mar 2017 12:05:26 -0400 Jérôme Glisse >> wrote: >> >>> +static inline struct page *migrate_pfn_to_page(unsigned long mpfn) >>> +{ >>> +

Re: [HMM 07/16] mm/migrate: new memory migration helper for use with device memory v4

2017-03-16 Thread Balbir Singh
On Fri, Mar 17, 2017 at 11:22 AM, John Hubbard wrote: > On 03/16/2017 04:05 PM, Andrew Morton wrote: >> >> On Thu, 16 Mar 2017 12:05:26 -0400 Jérôme Glisse >> wrote: >> >>> +static inline struct page *migrate_pfn_to_page(unsigned long mpfn) >>> +{ >>> + if (!(mpfn & MIGRATE_PFN_VALID)) >>>

Re: [HMM 07/16] mm/migrate: new memory migration helper for use with device memory v4

2017-03-16 Thread John Hubbard
On 03/16/2017 04:05 PM, Andrew Morton wrote: On Thu, 16 Mar 2017 12:05:26 -0400 Jérôme Glisse wrote: +static inline struct page *migrate_pfn_to_page(unsigned long mpfn) +{ + if (!(mpfn & MIGRATE_PFN_VALID)) + return NULL; + return pfn_to_page(mpfn

Re: [HMM 07/16] mm/migrate: new memory migration helper for use with device memory v4

2017-03-16 Thread John Hubbard
On 03/16/2017 04:05 PM, Andrew Morton wrote: On Thu, 16 Mar 2017 12:05:26 -0400 Jérôme Glisse wrote: +static inline struct page *migrate_pfn_to_page(unsigned long mpfn) +{ + if (!(mpfn & MIGRATE_PFN_VALID)) + return NULL; + return pfn_to_page(mpfn &

Re: [HMM 07/16] mm/migrate: new memory migration helper for use with device memory v4

2017-03-16 Thread Andrew Morton
On Thu, 16 Mar 2017 12:05:26 -0400 Jérôme Glisse wrote: > +static inline struct page *migrate_pfn_to_page(unsigned long mpfn) > +{ > + if (!(mpfn & MIGRATE_PFN_VALID)) > + return NULL; > + return pfn_to_page(mpfn & MIGRATE_PFN_MASK); > +} i386

Re: [HMM 07/16] mm/migrate: new memory migration helper for use with device memory v4

2017-03-16 Thread Andrew Morton
On Thu, 16 Mar 2017 12:05:26 -0400 Jérôme Glisse wrote: > +static inline struct page *migrate_pfn_to_page(unsigned long mpfn) > +{ > + if (!(mpfn & MIGRATE_PFN_VALID)) > + return NULL; > + return pfn_to_page(mpfn & MIGRATE_PFN_MASK); > +} i386 allnoconfig: In file included

Re: [HMM 07/16] mm/migrate: new memory migration helper for use with device memory v4

2017-03-16 Thread Balbir Singh
On Fri, Mar 17, 2017 at 3:24 AM, Reza Arbab wrote: > On Thu, Mar 16, 2017 at 12:05:26PM -0400, Jérôme Glisse wrote: >> >> This patch add a new memory migration helpers, which migrate memory >> backing a range of virtual address of a process to different memory (which >>

Re: [HMM 07/16] mm/migrate: new memory migration helper for use with device memory v4

2017-03-16 Thread Balbir Singh
On Fri, Mar 17, 2017 at 3:24 AM, Reza Arbab wrote: > On Thu, Mar 16, 2017 at 12:05:26PM -0400, Jérôme Glisse wrote: >> >> This patch add a new memory migration helpers, which migrate memory >> backing a range of virtual address of a process to different memory (which >> can be allocated through

Re: [HMM 07/16] mm/migrate: new memory migration helper for use with device memory v4

2017-03-16 Thread Reza Arbab
On Thu, Mar 16, 2017 at 12:05:26PM -0400, Jérôme Glisse wrote: This patch add a new memory migration helpers, which migrate memory backing a range of virtual address of a process to different memory (which can be allocated through special allocator). It differs from numa migration by working

Re: [HMM 07/16] mm/migrate: new memory migration helper for use with device memory v4

2017-03-16 Thread Reza Arbab
On Thu, Mar 16, 2017 at 12:05:26PM -0400, Jérôme Glisse wrote: This patch add a new memory migration helpers, which migrate memory backing a range of virtual address of a process to different memory (which can be allocated through special allocator). It differs from numa migration by working

[HMM 07/16] mm/migrate: new memory migration helper for use with device memory v4

2017-03-16 Thread Jérôme Glisse
This patch add a new memory migration helpers, which migrate memory backing a range of virtual address of a process to different memory (which can be allocated through special allocator). It differs from numa migration by working on a range of virtual address and thus by doing migration in chunk

[HMM 07/16] mm/migrate: new memory migration helper for use with device memory v4

2017-03-16 Thread Jérôme Glisse
This patch add a new memory migration helpers, which migrate memory backing a range of virtual address of a process to different memory (which can be allocated through special allocator). It differs from numa migration by working on a range of virtual address and thus by doing migration in chunk