[lkml]   [2007]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: missing madvise functionality
Eric Dumazet wrote:

> Well, I believe this one is too expensive. I was thinking of a light one :

This one seems worse. Passing your vm_area_cache around everywhere, which
is just intrusive and dangerous because ot becomes decoupled from the mm
struct you are passing around. Watch this:

> @@ -1638,7 +1652,7 @@ find_extend_vma(struct mm_struct * mm, u
> unsigned long start;
> addr &= PAGE_MASK;
> - vma = find_vma(mm,addr);
> + vma = find_vma(mm,addr,&current->vmacache);
> if (!vma)
> return NULL;
> if (vma->vm_start <= addr)

So now you can have current calling find_extend_vma on someone else's mm
but using their cache. So you're going to return current's vma, or current
is going to get one of mm's vmas in its cache :P

SUSE Labs, Novell Inc.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-04-04 12:09    [W:0.174 / U:5.812 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site