diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-08-13 15:30:00 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-08-13 15:30:00 +0000 |
commit | 71e437cadd861881dc7988b3b70ac86d3ce213f0 (patch) | |
tree | c67ed48981ad242dbc68cd85d75fe1f24959b252 /sys/uvm/uvm_page.c | |
parent | ab64632fb8a8abeab8ab07e684d1b25bc174526f (diff) |
PAGEFASTRECYCLE is an option we have been using for a while to encourage
the kernel to reuse freed pages as quickly as possible, and it has been
finding bugs (some of which we have already fixed)
ok kettenis
Diffstat (limited to 'sys/uvm/uvm_page.c')
-rw-r--r-- | sys/uvm/uvm_page.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/uvm/uvm_page.c b/sys/uvm/uvm_page.c index 2faa524de07..af2614506a5 100644 --- a/sys/uvm/uvm_page.c +++ b/sys/uvm/uvm_page.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_page.c,v 1.95 2009/08/06 15:28:14 oga Exp $ */ +/* $OpenBSD: uvm_page.c,v 1.96 2009/08/13 15:29:59 deraadt Exp $ */ /* $NetBSD: uvm_page.c,v 1.44 2000/11/27 08:40:04 chs Exp $ */ /* @@ -1083,8 +1083,13 @@ uvm_pagefree(struct vm_page *pg) atomic_clearbits_int(&pg->pg_flags, PG_ZERO); uvm_lock_fpageq(); +#ifdef PAGEFASTRECYCLE + TAILQ_INSERT_HEAD(&uvm.page_free[ + uvm_page_lookup_freelist(pg)].pgfl_queues[PGFL_UNKNOWN], pg, pageq); +#else TAILQ_INSERT_TAIL(&uvm.page_free[ uvm_page_lookup_freelist(pg)].pgfl_queues[PGFL_UNKNOWN], pg, pageq); +#endif atomic_clearbits_int(&pg->pg_flags, PQ_MASK); atomic_setbits_int(&pg->pg_flags, PQ_FREE); #ifdef DEBUG |