diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2009-07-23 21:39:11 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2009-07-23 21:39:11 +0000 |
commit | 862a2741ba87ec264b15303d04f5e02bdc49f3af (patch) | |
tree | c669796cd492f67dc388fcd1b697b61545d5dcb8 /sys | |
parent | c36299a1a93418bce2a3cb797dfe86016fe531b6 (diff) |
Insert free pages at the head of the page queues. Should provide better
cache locality and will pave the way for the new pmemrange allocator.
Based on hints from art@ and ariane@.
ok ariane@, deraadt@, oga@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/uvm/uvm_page.c | 4 | ||||
-rw-r--r-- | sys/uvm/uvm_pglist.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/uvm/uvm_page.c b/sys/uvm/uvm_page.c index d0415ed2ea6..44f535ae43f 100644 --- a/sys/uvm/uvm_page.c +++ b/sys/uvm/uvm_page.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_page.c,v 1.92 2009/07/22 21:05:37 oga Exp $ */ +/* $OpenBSD: uvm_page.c,v 1.93 2009/07/23 21:39:10 kettenis Exp $ */ /* $NetBSD: uvm_page.c,v 1.44 2000/11/27 08:40:04 chs Exp $ */ /* @@ -1199,7 +1199,7 @@ uvm_pagefree(struct vm_page *pg) atomic_clearbits_int(&pg->pg_flags, PG_ZERO); uvm_lock_fpageq(); - TAILQ_INSERT_TAIL(&uvm.page_free[ + TAILQ_INSERT_HEAD(&uvm.page_free[ uvm_page_lookup_freelist(pg)].pgfl_queues[PGFL_UNKNOWN], pg, pageq); atomic_clearbits_int(&pg->pg_flags, PQ_MASK); atomic_setbits_int(&pg->pg_flags, PQ_FREE); diff --git a/sys/uvm/uvm_pglist.c b/sys/uvm/uvm_pglist.c index 86234aef72e..91e34462186 100644 --- a/sys/uvm/uvm_pglist.c +++ b/sys/uvm/uvm_pglist.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_pglist.c,v 1.32 2009/06/17 00:13:59 oga Exp $ */ +/* $OpenBSD: uvm_pglist.c,v 1.33 2009/07/23 21:39:10 kettenis Exp $ */ /* $NetBSD: uvm_pglist.c,v 1.13 2001/02/18 21:19:08 chs Exp $ */ /*- @@ -409,7 +409,7 @@ uvm_pglistfree(struct pglist *list) #endif atomic_clearbits_int(&m->pg_flags, PQ_MASK); atomic_setbits_int(&m->pg_flags, PQ_FREE); - TAILQ_INSERT_TAIL(&uvm.page_free[ + TAILQ_INSERT_HEAD(&uvm.page_free[ uvm_page_lookup_freelist(m)].pgfl_queues[PGFL_UNKNOWN], m, pageq); uvmexp.free++; |