make free page queue filo rather than fifo.

data in pages freed more recently are more likely on cpu cache.
This commit is contained in:
yamt 2004-09-17 20:46:03 +00:00
parent 9acf283bdf
commit 9555030270
2 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_page.c,v 1.99 2004/09/01 11:53:38 yamt Exp $ */
/* $NetBSD: uvm_page.c,v 1.100 2004/09/17 20:46:03 yamt Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.99 2004/09/01 11:53:38 yamt Exp $");
__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.100 2004/09/17 20:46:03 yamt Exp $");
#include "opt_uvmhist.h"
@ -1427,7 +1427,7 @@ uvm_pagefree(pg)
uvm_pagezerocheck(pg);
#endif /* DEBUG */
TAILQ_INSERT_TAIL(pgfl, pg, pageq);
TAILQ_INSERT_HEAD(pgfl, pg, pageq);
uvmexp.free++;
if (iszero)
uvmexp.zeropages++;

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_pglist.c,v 1.31 2004/03/24 07:47:33 junyoung Exp $ */
/* $NetBSD: uvm_pglist.c,v 1.32 2004/09/17 20:46:03 yamt Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uvm_pglist.c,v 1.31 2004/03/24 07:47:33 junyoung Exp $");
__KERNEL_RCSID(0, "$NetBSD: uvm_pglist.c,v 1.32 2004/09/17 20:46:03 yamt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -483,7 +483,7 @@ uvm_pglistfree(list)
if (iszero)
uvm_pagezerocheck(pg);
#endif /* DEBUG */
TAILQ_INSERT_TAIL(&uvm.page_free[uvm_page_lookup_freelist(pg)].
TAILQ_INSERT_HEAD(&uvm.page_free[uvm_page_lookup_freelist(pg)].
pgfl_buckets[VM_PGCOLOR_BUCKET(pg)].
pgfl_queues[iszero ? PGFL_ZEROS : PGFL_UNKNOWN], pg, pageq);
uvmexp.free++;