Clarify free_list usage in uvm_page_physload() regarding faster/slower RAM.

Slower RAM should be assigned a higher free_list id.
No functional change to code, just comments and manpage
This commit is contained in:
abs 2009-03-12 12:55:16 +00:00
parent 9df66b68e0
commit fbcfe9c7af
3 changed files with 11 additions and 8 deletions

View File

@ -1,4 +1,4 @@
.\" $NetBSD: uvm.9,v 1.95 2009/03/12 12:39:15 joerg Exp $
.\" $NetBSD: uvm.9,v 1.96 2009/03/12 12:55:16 abs Exp $
.\"
.\" Copyright (c) 1998 Matthew R. Green
.\" All rights reserved.
@ -24,7 +24,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd October 9, 2008
.Dd March 12, 2009
.Dt UVM 9
.Os
.Sh NAME
@ -760,7 +760,10 @@ The arguments describe the
and
.Fa end
of the physical addresses of the segment, and the available start and end
addresses of pages not already in use.
addresses of pages not already in use. If a system has memory banks of
different speeds the slower memory should be given a higher
.Fa free_list
value.
.\" XXX expand on "system boot time"!
.Sh PROCESSES
.Bl -ohang

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_extern.h,v 1.151 2009/02/18 13:16:58 yamt Exp $ */
/* $NetBSD: uvm_extern.h,v 1.152 2009/03/12 12:55:16 abs Exp $ */
/*
*
@ -176,7 +176,7 @@ typedef voff_t pgoff_t; /* XXX: number of pages within a uvm object */
/*
* the following defines the strategies for uvm_pagealloc_strat()
*/
#define UVM_PGA_STRAT_NORMAL 0 /* high -> low free list walk */
#define UVM_PGA_STRAT_NORMAL 0 /* priority (low id to high) walk */
#define UVM_PGA_STRAT_ONLY 1 /* only specified free list */
#define UVM_PGA_STRAT_FALLBACK 2 /* ONLY falls back on NORMAL */

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_page.c,v 1.144 2009/02/27 23:29:08 drochner Exp $ */
/* $NetBSD: uvm_page.c,v 1.145 2009/03/12 12:55:16 abs 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.144 2009/02/27 23:29:08 drochner Exp $");
__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.145 2009/03/12 12:55:16 abs Exp $");
#include "opt_uvmhist.h"
#include "opt_readahead.h"
@ -1137,7 +1137,7 @@ uvm_pagealloc_strat(struct uvm_object *obj, voff_t off, struct vm_anon *anon,
again:
switch (strat) {
case UVM_PGA_STRAT_NORMAL:
/* Check all freelists in descending priority order. */
/* Check freelists: descending priority (ascending id) order */
for (lcv = 0; lcv < VM_NFREELIST; lcv++) {
pg = uvm_pagealloc_pgfl(ucpu, lcv,
try1, try2, &color);