Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm Introducing inner loop prevent us from exiting from ...
details: https://anonhg.NetBSD.org/src/rev/f5deb6f3d709
branches: trunk
changeset: 761389:f5deb6f3d709
user: enami <enami%NetBSD.org@localhost>
date: Wed Jan 26 08:49:48 2011 +0000
description:
Introducing inner loop prevent us from exiting from the original loop.
diffstat:
sys/uvm/uvm_pglist.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (37 lines):
diff -r 8f04ea055786 -r f5deb6f3d709 sys/uvm/uvm_pglist.c
--- a/sys/uvm/uvm_pglist.c Wed Jan 26 01:18:43 2011 +0000
+++ b/sys/uvm/uvm_pglist.c Wed Jan 26 08:49:48 2011 +0000
@@ -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)
{
Home |
Main Index |
Thread Index |
Old Index