Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Don't sleep forever if hz < 25.
details: https://anonhg.NetBSD.org/src/rev/fd21169b3c32
branches: trunk
changeset: 758325:fd21169b3c32
user: pooka <pooka%NetBSD.org@localhost>
date: Tue Nov 02 15:09:52 2010 +0000
description:
Don't sleep forever if hz < 25.
from Alessandro Forin
diffstat:
sys/kern/vfs_bio.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r e3d70667d4f5 -r fd21169b3c32 sys/kern/vfs_bio.c
--- a/sys/kern/vfs_bio.c Tue Nov 02 14:41:32 2010 +0000
+++ b/sys/kern/vfs_bio.c Tue Nov 02 15:09:52 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_bio.c,v 1.223 2010/03/02 14:22:44 pooka Exp $ */
+/* $NetBSD: vfs_bio.c,v 1.224 2010/11/02 15:09:52 pooka Exp $ */
/*-
* Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -123,7 +123,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.223 2010/03/02 14:22:44 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.224 2010/11/02 15:09:52 pooka Exp $");
#include "opt_bufcache.h"
@@ -1611,7 +1611,7 @@
if (nbusy_prev == 0)
nbusy_prev = nbusy;
printf("%d ", nbusy);
- kpause("bflush", false, (iter == 0) ? 1 : hz / 25 * iter, NULL);
+ kpause("bflush", false, MAX(1, hz / 25 * iter), NULL);
if (nbusy >= nbusy_prev) /* we didn't flush anything */
iter++;
else
Home |
Main Index |
Thread Index |
Old Index