Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Oct 2003 12:22:35 +1000
From:      Q <q@onthenet.com.au>
To:        freebsd-hackers@freebsd.org
Subject:   Some mmap observations compared to Linux 2.6/OpenBSD
Message-ID:  <1066789354.21430.39.camel@boxster.onthenet.com.au>

next in thread | raw e-mail | index | archive | help
As an effort to get more acquainted with the FreeBSD kernel, I have been
looking through how mmap works. I don't yet understand how it all fits
together, or of the exact implications things may have in the wild, but
I have noticed under some synthetic conditions, ie. mmaping small
non-contiguous pages of a file, mmap allocation scales much more poorly
on FreeBSD than on OpenBSD and Linux 2.6.

After investigating this further I have observed that vm_map_findspace()
traverses a linked list to find the next region (O(n) cost), whereas
OpenBSD and Linux 2.6 both use Red-Black trees for the same purpose
(O(log n) cost). Profiling the FreeBSD kernel appears to confirm this.

Can someone comment on whether this is something that has been done
intentionally, or avoided in favour of some other yet to be implemented
solution? Or is it still on someones todo list.

-- 
Seeya...Q

               -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
                        
                          _____  /   Quinton Dolan -  q@OntheNet.com.au
  __  __/  /   /   __/   /      /          
     /    __  /   _/    /      /         Gold Coast, QLD, Australia
  __/  __/ __/ ____/   /   -  /             Ph: +61 419 729 806
                    _______  /              
                            _\



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