Page MenuHomeFreeBSD

D59403.diff
No OneTemporary

D59403.diff

diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c
--- a/sys/kern/sched_4bsd.c
+++ b/sys/kern/sched_4bsd.c
@@ -503,11 +503,6 @@
* ts_pctcpu is only for ps and ttyinfo().
*/
ts->ts_pctcpu = (ts->ts_pctcpu * ccpu) >> FSHIFT;
- /*
- * If the td_sched has been idle the entire second,
- * stop recalculating its priority until
- * it wakes up.
- */
if (ts->ts_cpticks != 0) {
#if (FSHIFT >= CCPU_SHIFT)
ts->ts_pctcpu += (realstathz == 100)
@@ -543,6 +538,12 @@
ts->ts_slptime = 0;
} else
ts->ts_slptime++;
+
+ /*
+ * If the td_sched has been idle the entire second,
+ * stop recalculating its priority until
+ * it wakes up.
+ */
if (ts->ts_slptime > 1) {
thread_unlock(td);
continue;

File Metadata

Mime Type
text/plain
Expires
Sat, Oct 10, 9:07 AM (2 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39229161
Default Alt Text
D59403.diff (770 B)

Event Timeline