lkml.org 
[lkml]   [2001]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] mm/mmap.c find_vma(), kernel 2.4.0
Date
>
>
> On Mon, 8 Jan 2001, Robert Wienholt, Jr. wrote:
>
> > Gentlemen,
> >
> > I was looking through some of the memory management code today and
> > came across something that may provide a minor performance boost. I have
> > included a patch below for the 2.4.0 source.
> >
> > In the find_vma function a cached vma is checked and if that is
> > not the requested vma, the linked list (unless there's an avl tree) is
> > traversed from the beginning. My thought was that if the cached vma is
> > somewhere in the middle of a "long" list, and the memory address we are
> ^^^^^^^^^^
> No such thing. If you get many VMAs you get AVL tree and that's what is
> used for search.
>

Well, that's why I put the "long" in quotes. If the cached vma is the
10th in the list and we're looking for the 12th... we'll go through the
traversal loop twice instead of 12 times. That's the point I was trying
to make. But if we're looking for the 3rd... we'll just start at the
beginning and no harm was done.


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

\
 
 \ /
  Last update: 2005-03-22 12:52    [W:0.039 / U:11.656 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site