RE: [PATCH v8 05/22] Add vm_replace_mixed()

2014-07-28 Thread Zhang, Tianfei
ernel@vger.kernel.org > Subject: Re: [PATCH v8 05/22] Add vm_replace_mixed() > > On Fri, Jul 25, 2014 at 03:44:50PM -0400, Matthew Wilcox wrote: > > On Wed, Jul 23, 2014 at 06:55:00PM +0300, Kirill A. Shutemov wrote: > > > > update_hiwater_rss(mm); > > >

Re: [PATCH v8 05/22] Add vm_replace_mixed()

2014-07-28 Thread Kirill A. Shutemov
On Fri, Jul 25, 2014 at 03:44:50PM -0400, Matthew Wilcox wrote: > On Wed, Jul 23, 2014 at 06:55:00PM +0300, Kirill A. Shutemov wrote: > > > update_hiwater_rss(mm); > > > > No: you cannot end up with lower rss after replace, iiuc. > > Actually, you can ... when we replace a real page with

Re: [PATCH v8 05/22] Add vm_replace_mixed()

2014-07-25 Thread Matthew Wilcox
On Wed, Jul 23, 2014 at 06:55:00PM +0300, Kirill A. Shutemov wrote: > > update_hiwater_rss(mm); > > No: you cannot end up with lower rss after replace, iiuc. Actually, you can ... when we replace a real page with a PFN, our rss decreases. > Do you mean you pointed to new file all the tim

RE: [PATCH v8 05/22] Add vm_replace_mixed()

2014-07-23 Thread Zhang, Tianfei
Kirill A. Shutemov > Sent: Wednesday, July 23, 2014 11:55 PM > To: Matthew Wilcox > Cc: Wilcox, Matthew R; linux-fsde...@vger.kernel.org; linux...@kvack.org; > linux-kernel@vger.kernel.org > Subject: Re: [PATCH v8 05/22] Add vm_replace_mixed() > > On Wed, Jul 23, 2014 at 10:27:45AM

Re: [PATCH v8 05/22] Add vm_replace_mixed()

2014-07-23 Thread Kirill A. Shutemov
On Wed, Jul 23, 2014 at 10:27:45AM -0400, Matthew Wilcox wrote: > On Wed, Jul 23, 2014 at 05:20:48PM +0300, Kirill A. Shutemov wrote: > > On Wed, Jul 23, 2014 at 09:52:22AM -0400, Matthew Wilcox wrote: > > > I'd love to use a lighter-weight weapon! What would you recommend using, > > > zap_pte_ran

Re: [PATCH v8 05/22] Add vm_replace_mixed()

2014-07-23 Thread Matthew Wilcox
On Wed, Jul 23, 2014 at 05:20:48PM +0300, Kirill A. Shutemov wrote: > On Wed, Jul 23, 2014 at 09:52:22AM -0400, Matthew Wilcox wrote: > > I'd love to use a lighter-weight weapon! What would you recommend using, > > zap_pte_range()? > > The most straight-forward way: extract body of pte cycle from

Re: [PATCH v8 05/22] Add vm_replace_mixed()

2014-07-23 Thread Kirill A. Shutemov
On Wed, Jul 23, 2014 at 09:52:22AM -0400, Matthew Wilcox wrote: > On Wed, Jul 23, 2014 at 02:45:40PM +0300, Kirill A. Shutemov wrote: > > On Tue, Jul 22, 2014 at 03:47:53PM -0400, Matthew Wilcox wrote: > > > From: Matthew Wilcox > > > > > > vm_insert_mixed() will fail if there is already a valid

Re: [PATCH v8 05/22] Add vm_replace_mixed()

2014-07-23 Thread Matthew Wilcox
On Wed, Jul 23, 2014 at 02:45:40PM +0300, Kirill A. Shutemov wrote: > On Tue, Jul 22, 2014 at 03:47:53PM -0400, Matthew Wilcox wrote: > > From: Matthew Wilcox > > > > vm_insert_mixed() will fail if there is already a valid PTE at that > > location. The DAX code would rather replace the previous

Re: [PATCH v8 05/22] Add vm_replace_mixed()

2014-07-23 Thread Kirill A. Shutemov
On Tue, Jul 22, 2014 at 03:47:53PM -0400, Matthew Wilcox wrote: > From: Matthew Wilcox > > vm_insert_mixed() will fail if there is already a valid PTE at that > location. The DAX code would rather replace the previous value with > the new PTE. > > Signed-off-by: Matthew Wilcox > --- > include

Re: [PATCH v8 05/22] Add vm_replace_mixed()

2014-07-23 Thread Jan Kara
On Tue 22-07-14 15:47:53, Matthew Wilcox wrote: > From: Matthew Wilcox > > vm_insert_mixed() will fail if there is already a valid PTE at that > location. The DAX code would rather replace the previous value with > the new PTE. > > Signed-off-by: Matthew Wilcox This looks good to me although