diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2016-04-17 11:04:27 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2016-04-17 11:04:27 +0000 |
commit | ccd0ec406677d50d17580ff87c50993f6a78bfe2 (patch) | |
tree | 66c1c7fbde4ffdb3aa09dbb4a148005b11ef9188 /sys/kern/kern_proc.c | |
parent | e164cafc699818f27dd1f24776a19bea4fd0b6f4 (diff) | |
download | src-ccd0ec406677d50d17580ff87c50993f6a78bfe2.tar.gz src-ccd0ec406677d50d17580ff87c50993f6a78bfe2.zip |
The struct thread td_estcpu member is only used by the 4BSD scheduler.
Move it to the struct td_sched for 4BSD, removing always present
field, otherwise unused for ULE.
New scheduler method sched_estcpu() returns the estimation for
kinfo_proc consumption. As before, it always returns 0 for ULE.
Remove sched_tick() scheduler method, unused both by 4BSD and ULE.
Update locking comment for the 4BSD struct td_sched, copying it from
the same comment for ULE.
Spell MAXPRI as PRI_MAX_TIMESHARE in the 4BSD comment.
Based on some notes from, and reviewed by: bde
Sponsored by: The FreeBSD Foundation
Notes
Notes:
svn path=/head/; revision=298145
Diffstat (limited to 'sys/kern/kern_proc.c')
-rw-r--r-- | sys/kern/kern_proc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 9a41165b8f80..3b220c38e0b3 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -855,7 +855,7 @@ fill_kinfo_aggregate(struct proc *p, struct kinfo_proc *kp) FOREACH_THREAD_IN_PROC(p, td) { thread_lock(td); kp->ki_pctcpu += sched_pctcpu(td); - kp->ki_estcpu += td->td_estcpu; + kp->ki_estcpu += sched_estcpu(td); thread_unlock(td); } } @@ -1101,7 +1101,7 @@ fill_kinfo_thread(struct thread *td, struct kinfo_proc *kp, int preferthread) rufetchtd(td, &kp->ki_rusage); kp->ki_runtime = cputick2usec(td->td_rux.rux_runtime); kp->ki_pctcpu = sched_pctcpu(td); - kp->ki_estcpu = td->td_estcpu; + kp->ki_estcpu = sched_estcpu(td); kp->ki_cow = td->td_cow; } |