Re: Nick's core remove PageReserved broke vmware...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 10 Nov 2005, Michael S. Tsirkin wrote:
> Quoting Gleb Natapov <[email protected]>:
> > I think you are removing VM_RAND_READ/VM_SEQ_READ here.

Good catch from Gleb, I certainly didn't notice that.
> 
> 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;

Yes, that helps avoid such errors in future.  Though, no strong feelings,
but I'd find it clearer to avoid the obscure VM_READHINTMASK completely,
and just say (vma->vm_flags & ~VM_RAND_READ) | VM_SEQ_READ etc.

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux