diff options
author | Jeff Roberson <jeff@FreeBSD.org> | 2003-12-11 04:23:39 +0000 |
---|---|---|
committer | Jeff Roberson <jeff@FreeBSD.org> | 2003-12-11 04:23:39 +0000 |
commit | 2e227f040698894dca9827b22bf5b8a93d4817e4 (patch) | |
tree | 355200e9e61b010837b4d8e098d3a4eea8c12a01 /sys/kern/sched_ule.c | |
parent | b11fdad0fc3618bbd752dcb67beb20a2a804884f (diff) | |
download | src-2e227f040698894dca9827b22bf5b8a93d4817e4.tar.gz src-2e227f040698894dca9827b22bf5b8a93d4817e4.zip |
- Don't let the pctcpu rate limiter throttle us if we have recorded over
SCHED_CPU_TICKS ticks. This was allowing processes to display
(1/SCHED_CPU_TIME * 100) % more cpu than they had used.
Notes
Notes:
svn path=/head/; revision=123435
Diffstat (limited to 'sys/kern/sched_ule.c')
-rw-r--r-- | sys/kern/sched_ule.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c index f7a9636d75c8..8c4eeaa8a0ea 100644 --- a/sys/kern/sched_ule.c +++ b/sys/kern/sched_ule.c @@ -1584,7 +1584,8 @@ sched_pctcpu(struct thread *td) * this causes the cpu usage to decay away too quickly due to * rounding errors. */ - if (ke->ke_ltick < (ticks - (hz / 2))) + if (ke->ke_ftick + SCHED_CPU_TICKS < ke->ke_ltick || + ke->ke_ltick < (ticks - (hz / 2))) sched_pctcpu_update(ke); /* How many rtick per second ? */ rtick = min(ke->ke_ticks / SCHED_CPU_TIME, SCHED_CPU_TICKS); |