diff options
author | jeff <jeff@FreeBSD.org> | 2003-01-28 09:30:17 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2003-01-28 09:30:17 +0000 |
commit | ea90c5e5d4ec75f9243722525b9a86474cc3f4d6 (patch) | |
tree | 2fe7436fbf34588a7e46a46bb00e514edb47b9fd /sys | |
parent | 4b57d52c50a7ae9044cb9df9f2fb9dec91b8fbbb (diff) | |
download | FreeBSD-src-ea90c5e5d4ec75f9243722525b9a86474cc3f4d6.zip FreeBSD-src-ea90c5e5d4ec75f9243722525b9a86474cc3f4d6.tar.gz |
- Allow idle's pctcpu time to be calculated.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/sched_ule.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c index 199fcb6..8b3202b 100644 --- a/sys/kern/sched_ule.c +++ b/sys/kern/sched_ule.c @@ -502,6 +502,12 @@ sched_clock(struct thread *td) ke = td->td_kse; kg = td->td_ksegrp; + ke->ke_ticks += 10000; + ke->ke_ltick = ticks; + /* Go up to one second beyond our max and then trim back down */ + if (ke->ke_ftick + SCHED_CPU_TICKS + hz < ke->ke_ltick) + sched_pctcpu_update(ke); + if (td->td_kse->ke_flags & KEF_IDLEKSE) { #if 0 if (nke && nke->ke_ksegrp->kg_pri_class == PRI_TIMESHARE) { @@ -545,12 +551,6 @@ sched_clock(struct thread *td) ke->ke_flags |= KEF_NEEDRESCHED; ke->ke_runq = NULL; } - - ke->ke_ticks += 10000; - ke->ke_ltick = ticks; - /* Go up to one second beyond our max and then trim back down */ - if (ke->ke_ftick + SCHED_CPU_TICKS + hz < ke->ke_ltick) - sched_pctcpu_update(ke); } void sched_print_load(void); |