Re: [PATCH v11 02/14] HMM: add special swap filetype for memory migrated to device v2.

2015-10-22 Thread Jerome Glisse
On Fri, Oct 23, 2015 at 11:23:26AM +0800, Hillf Danton wrote: > > > > + if (cnt_hmm_entry) { > > > > + int ret; > > > > + > > > > + ret = hmm_mm_fork(src_mm, dst_mm, dst_vma, > > > > + dst_pmd, start, end); > > > > > > Given start, s

Re: [PATCH v11 02/14] HMM: add special swap filetype for memory migrated to device v2.

2015-10-22 Thread Hillf Danton
> > > + if (cnt_hmm_entry) { > > > + int ret; > > > + > > > + ret = hmm_mm_fork(src_mm, dst_mm, dst_vma, > > > + dst_pmd, start, end); > > > > Given start, s/end/addr/, no? > > No, end is the right upper limit here. > Then in the first loop, hmm_mm_fork i

Re: [PATCH v11 02/14] HMM: add special swap filetype for memory migrated to device v2.

2015-10-22 Thread Jerome Glisse
On Thu, Oct 22, 2015 at 03:52:53PM +0800, Hillf Danton wrote: > > > > When migrating anonymous memory from system memory to device memory > > CPU pte are replaced with special HMM swap entry so that page fault, > > get user page (gup), fork, ... are properly redirected to HMM helpers. > > > > Thi

Re: [PATCH v11 02/14] HMM: add special swap filetype for memory migrated to device v2.

2015-10-22 Thread Hillf Danton
> > When migrating anonymous memory from system memory to device memory > CPU pte are replaced with special HMM swap entry so that page fault, > get user page (gup), fork, ... are properly redirected to HMM helpers. > > This patch only add the new swap type entry and hooks HMM helpers > functions

[PATCH v11 02/14] HMM: add special swap filetype for memory migrated to device v2.

2015-10-21 Thread Jérôme Glisse
From: Jerome Glisse When migrating anonymous memory from system memory to device memory CPU pte are replaced with special HMM swap entry so that page fault, get user page (gup), fork, ... are properly redirected to HMM helpers. This patch only add the new swap type entry and hooks HMM helpers fu