summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2003-01-13 03:42:41 +0000
committerjeff <jeff@FreeBSD.org>2003-01-13 03:42:41 +0000
commitea9786da1d0d0d725a0dbae53f574b06fcc9353b (patch)
tree953873138bdb31ee45b1a8b186961569e193c641 /sys/kern
parent00efaa2209ef1ec7d60df592d84cc09dca58670e (diff)
downloadFreeBSD-src-ea9786da1d0d0d725a0dbae53f574b06fcc9353b.zip
FreeBSD-src-ea9786da1d0d0d725a0dbae53f574b06fcc9353b.tar.gz
- Unbreak world. I did not notice that libkvm was still used in some places
to access the pctcpu. This will have to be sorted out more later as the new scheduler requires a procedural interface for this data. A more complete solution will follow.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/sched_4bsd.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c
index 344422b..325911f 100644
--- a/sys/kern/sched_4bsd.c
+++ b/sys/kern/sched_4bsd.c
@@ -63,7 +63,6 @@
struct ke_sched {
int ske_cpticks; /* (j) Ticks of cpu time. */
- fixpt_t ske_pctcpu; /* (j) %cpu during p_swtime. */
};
struct ke_sched ke_sched;
@@ -285,8 +284,8 @@ schedcpu(void *arg)
* Do it per kse.. and add them up at the end?
* XXXKSE
*/
- ke->ke_sched->ske_pctcpu
- = (ke->ke_sched->ske_pctcpu * ccpu) >>
+ ke->ke_pctcpu
+ = (ke->ke_pctcpu * ccpu) >>
FSHIFT;
/*
* If the kse has been idle the entire second,
@@ -296,13 +295,13 @@ schedcpu(void *arg)
if (ke->ke_sched->ske_cpticks == 0)
continue;
#if (FSHIFT >= CCPU_SHIFT)
- ke->ke_sched->ske_pctcpu += (realstathz == 100)
+ ke->ke_pctcpu += (realstathz == 100)
? ((fixpt_t) ke->ke_sched->ske_cpticks) <<
(FSHIFT - CCPU_SHIFT) :
100 * (((fixpt_t) ke->ke_sched->ske_cpticks)
<< (FSHIFT - CCPU_SHIFT)) / realstathz;
#else
- ke->ke_sched->ske_pctcpu += ((FSCALE - ccpu) *
+ ke->ke_pctcpu += ((FSCALE - ccpu) *
(ke->ke_sched->ske_cpticks *
FSCALE / realstathz)) >> FSHIFT;
#endif
@@ -482,7 +481,6 @@ sched_fork(struct ksegrp *kg, struct ksegrp *child)
/* Set up scheduler specific data */
ke = FIRST_KSE_IN_KSEGRP(kg);
- ke->ke_sched->ske_pctcpu = 0;
ke->ke_sched->ske_cpticks = 0;
}
@@ -667,5 +665,5 @@ sched_sizeof_thread(void)
fixpt_t
sched_pctcpu(struct kse *ke)
{
- return (ke->ke_sched->ske_pctcpu);
+ return (ke->ke_pctcpu);
}
OpenPOWER on IntegriCloud