tech-kern archive

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

Re: rbtree for uvm_pagelookup()

On Mon, Jun 02, 2008 at 12:15:23PM +0100, Andrew Doran wrote:

> This replaces the global page hash with a per-object red-black tree. Memory
> consumption should be lower than with the hash and it seems to speed up
> slightly on a MP system.

Here's an updated diff that does a few more things. A lot of the change is

- rbtree for uvm_pagelookup() as before.

- Make page colour index and pagezero state per-cpu.

- When freeing a page, put it onto the global freelist as we do now and
  also onto a per-cpu freelist. When allocating, prefer pages from the local
  cpu, which are likely to have their contents in local cache. If we find
  none, try the global list.

- On x86, don't bother using sse to copy/zero pages on demand.  It turns out
  not to be worth it.

- On x86, re-enable zeroing pages in the idle loop and there use the sse
  instructions so we don't blow out the cache.

I'm going to do the last two anyway, but any comments on the rest?

Here's how it affects -j16 release on an 8-core system. All are
using hand-compiled gcc 4.3.0 for bootstrap.


Home | Main Index | Thread Index | Old Index