Module Name:    src
Committed By:   enami
Date:           Wed Jan 26 08:49:49 UTC 2011

Modified Files:
        src/sys/uvm: uvm_pglist.c

Log Message:
Introducing inner loop prevent us from exiting from the original loop.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/uvm/uvm_pglist.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/uvm/uvm_pglist.c
diff -u src/sys/uvm/uvm_pglist.c:1.59 src/sys/uvm/uvm_pglist.c:1.60
--- src/sys/uvm/uvm_pglist.c:1.59	Tue Jan 25 17:22:43 2011
+++ src/sys/uvm/uvm_pglist.c	Wed Jan 26 08:49:48 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_pglist.c,v 1.59 2011/01/25 17:22:43 matt Exp $	*/
+/*	$NetBSD: uvm_pglist.c,v 1.60 2011/01/26 08:49:48 enami Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_pglist.c,v 1.59 2011/01/25 17:22:43 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_pglist.c,v 1.60 2011/01/26 08:49:48 enami Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -390,8 +390,9 @@
 	if (high <= ps->avail_start || low >= ps->avail_end)
 		return 0;
 
+again:
 	for (;; try++, pg++) {
-		while (try >= limit) {
+		if (try >= limit) {
 			if (ps->start_hint == 0 || second_pass) {
 				try = limit - 1;
 				break;
@@ -400,6 +401,7 @@
 			try = max(low, ps->avail_start);
 			limit = min(limit, ps->avail_start + ps->start_hint);
 			pg = &ps->pgs[try - ps->start];
+			goto again;
 		}
 #if defined(DEBUG)
 		{

Reply via email to