Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 May 2002 10:28:15 -0700 (PDT)
From:      Lamont Granquist <lamont@scriptkiddie.org>
To:        David Schultz <dschultz@uclink.Berkeley.EDU>
Cc:        Rohit Grover <rohit@gojuryu.com>, <freebsd-hackers@FreeBSD.ORG>
Subject:   Re: VM Question (was Re: larger kernel virtual address space)
Message-ID:  <20020501102349.J6199-100000@coredump.scriptkiddie.org>
In-Reply-To: <20020501002336.A14305@HAL9000.wox.org>

next in thread | previous in thread | raw e-mail | index | archive | help


On Wed, 1 May 2002, David Schultz wrote:
> Thus spake Lamont Granquist <lamont@scriptkiddie.org>:
> > Does the FreeBSD VM system do O(1) or O(N) searches for gaps in a
> > processes virtual memory space?
>
> I'm not a VM guru, but if I'm reading vm_map.c right, it's O(n)
> w.r.t. the number of map entries.  But since map entries are merged
> when possible, I would expect the cost to stay fairly low.

I know of one app running on Linux/x86 which spends about 40% of its
kernel time in get_unmapped_pages() (the Linux equivalent).  Trying to
mmap() bits and pieces of 20GB worth of data into a 4GB VM space tends to
lead to a lot of fragmentation.  Be interesting to see if merging would
help, but I'd suggest an O(1) algorithm for this.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020501102349.J6199-100000>