Re: [PATCH] mm: tracking shared dirty pages -v10

From: Peter Zijlstra
Date: Fri Jun 23 2006 - 18:42:59 EST


On Fri, 2006-06-23 at 15:35 -0700, Linus Torvalds wrote:
> On Sat, 24 Jun 2006, Peter Zijlstra wrote:
>
> > > > + if ((pgprot_val(vma->vm_page_prot) == pgprot_val(vm_page_prot) &&
> > > > + ((vm_flags & (VM_WRITE|VM_SHARED|VM_PFNMAP|VM_INSERTPAGE)) ==
> > > > + (VM_WRITE|VM_SHARED)) &&
> > > > + vma->vm_file && vma->vm_file->f_mapping &&
> > > > + mapping_cap_account_dirty(vma->vm_file->f_mapping)) ||
> > > > + (vma->vm_ops && vma->vm_ops->page_mkwrite))
> > > > + vma->vm_page_prot =
> > > > + protection_map[vm_flags & (VM_READ|VM_WRITE|VM_EXEC)];
> > > > +
> > >
> > > I'm dazzled by the beauty of it!
> >
> > It's a real beauty isn't it :-)
>
> Since Hugh pointed that out..
>
> It really would be nice to just encapsulate that as an inline function of
> its own, and move the comment at the top of it to be at the top of the
> inline function.

Dang, I just send out -v11, awell such is life. I'll see what I can do.
Preferably mprotect can reuse that same function.

Will repost a new 1/5 shortly.

Peter

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/