Re: [PATCH] mm: introduce for_each_vma helpers

2014-08-15 Thread Hugh Dickins
On Wed, 13 Aug 2014, Andrew Morton wrote: > On Tue, 12 Aug 2014 16:46:48 -0700 Davidlohr Bueso wrote: > > On Wed, 2014-08-13 at 00:52 +0300, Kirill A. Shutemov wrote: > > > On Tue, Aug 12, 2014 at 10:45:23AM -0700, Davidlohr Bueso wrote: > > > > The most common way of iterating through the list of

Re: [PATCH] mm: introduce for_each_vma helpers

2014-08-13 Thread Andrew Morton
On Tue, 12 Aug 2014 16:46:48 -0700 Davidlohr Bueso wrote: > On Wed, 2014-08-13 at 00:52 +0300, Kirill A. Shutemov wrote: > > On Tue, Aug 12, 2014 at 10:45:23AM -0700, Davidlohr Bueso wrote: > > > The most common way of iterating through the list of vmas, is via: > > > for (vma = mm->mmap; vma

Re: [PATCH] mm: introduce for_each_vma helpers

2014-08-12 Thread Davidlohr Bueso
On Wed, 2014-08-13 at 00:52 +0300, Kirill A. Shutemov wrote: > On Tue, Aug 12, 2014 at 10:45:23AM -0700, Davidlohr Bueso wrote: > > The most common way of iterating through the list of vmas, is via: > > for (vma = mm->mmap; vma; vma = vma->vm_next) > > > > This patch replaces this logic with a

Re: [PATCH] mm: introduce for_each_vma helpers

2014-08-12 Thread Davidlohr Bueso
On Wed, 2014-08-13 at 00:52 +0300, Kirill A. Shutemov wrote: > On Tue, Aug 12, 2014 at 10:45:23AM -0700, Davidlohr Bueso wrote: > > The most common way of iterating through the list of vmas, is via: > > for (vma = mm->mmap; vma; vma = vma->vm_next) > > > > This patch replaces this logic with a

Re: [PATCH] mm: introduce for_each_vma helpers

2014-08-12 Thread Kirill A. Shutemov
On Tue, Aug 12, 2014 at 10:45:23AM -0700, Davidlohr Bueso wrote: > The most common way of iterating through the list of vmas, is via: > for (vma = mm->mmap; vma; vma = vma->vm_next) > > This patch replaces this logic with a new for_each_vma(vma) helper, > which 1) encapsulates this logic, and

[PATCH] mm: introduce for_each_vma helpers

2014-08-12 Thread Davidlohr Bueso
The most common way of iterating through the list of vmas, is via: for (vma = mm->mmap; vma; vma = vma->vm_next) This patch replaces this logic with a new for_each_vma(vma) helper, which 1) encapsulates this logic, and 2) make it easier to read. It also updates most of the callers, so its a pr