summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsudheer <none@none>2006-06-28 23:14:24 -0700
committersudheer <none@none>2006-06-28 23:14:24 -0700
commit8ace1d316428fa14a0c6bb8fed9f6240255ee284 (patch)
tree0d185af177bc3bc46880ab61e7b2aee46da08591
parentbebbc3e5f7d8247502564757b36ad95b03dfb1af (diff)
downloadillumos-gate-8ace1d316428fa14a0c6bb8fed9f6240255ee284.tar.gz
6431599 system hang under heavy /proc access
-rw-r--r--usr/src/uts/common/fs/proc/prsubr.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/usr/src/uts/common/fs/proc/prsubr.c b/usr/src/uts/common/fs/proc/prsubr.c
index 8258119a94..2c26ee77f3 100644
--- a/usr/src/uts/common/fs/proc/prsubr.c
+++ b/usr/src/uts/common/fs/proc/prsubr.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -21,7 +20,7 @@
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -2688,14 +2687,13 @@ prgetusage(kthread_t *t, prhusage_t *pup)
default: panic("prgetusage: unknown microstate");
}
tmp1 = curtime - ms->ms_state_start;
- if (tmp1 <= 0) {
+ if (tmp1 < 0) {
curtime = gethrtime_unscaled();
- tmp1 = 0;
i++;
continue;
}
scalehrtime(&tmp1);
- } while (tmp1 <= 0 && i < MAX_ITERS_SPIN);
+ } while (tmp1 < 0 && i < MAX_ITERS_SPIN);
*mstimep += tmp1;
@@ -2848,14 +2846,13 @@ praddusage(kthread_t *t, prhusage_t *pup)
default: panic("praddusage: unknown microstate");
}
tmp = curtime - ms->ms_state_start;
- if (tmp <= 0) {
+ if (tmp < 0) {
curtime = gethrtime_unscaled();
- tmp = 0;
i++;
continue;
}
scalehrtime(&tmp);
- } while (tmp <= 0 && i < MAX_ITERS_SPIN);
+ } while (tmp < 0 && i < MAX_ITERS_SPIN);
*mstimep += tmp;