lkml.org 
[lkml]   [2005]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Nick's core remove PageReserved broke vmware...
Quoting Gleb Natapov <gleb@minantech.com>:
> Subject: Re: Nick's core remove PageReserved broke vmware...
>
> On Tue, Nov 08, 2005 at 11:34:07PM +0200, Michael S. Tsirkin wrote:
> > Index: linux-2.6.14-dontcopy/mm/madvise.c
> > ===================================================================
> > --- linux-2.6.14-dontcopy.orig/mm/madvise.c 2005-10-28
> 02:02:08.000000000 +0200
> > +++ linux-2.6.14-dontcopy/mm/madvise.c 2005-11-08
> 23:28:56.000000000 +0200
> > @@ -31,6 +31,12 @@ static long madvise_behavior(struct vm_a
> > case MADV_RANDOM:
> > new_flags |= VM_RAND_READ;
> > break;
> > + case MADV_DONTCOPY:
> > + new_flags |= VM_UDONTCOPY;
> > + break;
> > + case MADV_DOCOPY:
> > + new_flags &= ~VM_UDONTCOPY;
> > + break;
> > default:
> > break;
> > }
> I think you are removing VM_RAND_READ/VM_SEQ_READ here.

True, we need something like

switch (behavior) {
case MADV_SEQUENTIAL:
new_flags = (vma->vm_flags & ~VM_READHINTMASK) | VM_SEQ_READ;
break;
case MADV_RANDOM:
new_flags = (vma->vm_flags & ~VM_READHINTMASK) | VM_RAND_READ;
break;
case MADV_DONTCOPY:
new_flags |= VM_UDONTCOPY;
break;
case MADV_DOCOPY:
new_flags &= ~VM_UDONTCOPY;
break;
default:
break;
}

Thanks!

> Also perhapse we should skip VM_SHARED VMAs?

Why?

> --
> Gleb.
>

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

\
 
 \ /
  Last update: 2005-11-10 13:48    [W:0.820 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site