lkml.org 
[lkml]   [2009]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/8] mm: munlock use follow_page
On Tue, 8 Sep 2009, KAMEZAWA Hiroyuki wrote:
> On Mon, 7 Sep 2009 22:29:55 +0100 (BST)
> Hugh Dickins <hugh.dickins@tiscali.co.uk> wrote:
> > void munlock_vma_pages_range(struct vm_area_struct *vma,
> > - unsigned long start, unsigned long end)
> > + unsigned long start, unsigned long end)
> > {
> > + unsigned long addr;
> > +
> > + lru_add_drain();
> > vma->vm_flags &= ~VM_LOCKED;
> > - __mlock_vma_pages_range(vma, start, end, 0);
> > +
> > + for (addr = start; addr < end; addr += PAGE_SIZE) {
> > + struct page *page = follow_page(vma, addr, FOLL_GET);
> > + if (page) {
> > + lock_page(page);
> > + if (page->mapping)
> > + munlock_vma_page(page);
>
> Could you add "please see __mlock_vma_pages_range() to see why" or some here ?

Why the test on page->mapping?
Right, I'll add some such comment on that.
Waiting a day or two to see what else comes up.

Thanks,
Hugh


\
 
 \ /
  Last update: 2009-09-08 13:35    [W:0.048 / U:2.524 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site