diff options
author | akolb <none@none> | 2007-03-09 15:55:28 -0800 |
---|---|---|
committer | akolb <none@none> | 2007-03-09 15:55:28 -0800 |
commit | c97ad5cdc75eb73e3cc38542ca3ba783574b0a7a (patch) | |
tree | 5ba1653d892978d87d6061c8c7f3821f4b3e354c /usr/src/uts/common/os/clock.c | |
parent | 68d3ac02fc9db49ae9dccaecff999963114930a7 (diff) | |
download | illumos-joyent-c97ad5cdc75eb73e3cc38542ca3ba783574b0a7a.tar.gz |
PSARC/2004/402 CPU Caps
6327235 PSARC/2004/402 CPU caps
6464161 Dead KSLICE code should be removed
6514387 FX class contains dead code to keep list of member threads
6518395 kstat_zone_add performs KM_SLEEP allocation when it should not
Diffstat (limited to 'usr/src/uts/common/os/clock.c')
-rw-r--r-- | usr/src/uts/common/os/clock.c | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/usr/src/uts/common/os/clock.c b/usr/src/uts/common/os/clock.c index 0a8a99f0af..06babeb55c 100644 --- a/usr/src/uts/common/os/clock.c +++ b/usr/src/uts/common/os/clock.c @@ -79,8 +79,7 @@ #include <sys/inttypes.h> /* - * clock is called straight from - * the real time clock interrupt. + * clock() is called straight from the clock cyclic; see clock_init(). * * Functions: * reprime clock @@ -314,10 +313,7 @@ static int genloadavg(struct loadavg_s *); static void loadavg_update(); void (*cmm_clock_callout)() = NULL; - -#ifdef KSLICE -int kslice = KSLICE; -#endif +void (*cpucaps_clock_callout)() = NULL; static void clock(void) @@ -513,9 +509,10 @@ clock(void) /* * Do tick processing for all the active threads running in - * the system. + * the system. We're trying to be more fair by walking the + * list of CPUs starting from a different CPUs each time. */ - cp = cpu_list; + cp = clock_cpu_list; nrunning = 0; do { klwp_id_t lwp; @@ -649,21 +646,11 @@ clock(void) clock_tick(t); } -#ifdef KSLICE - /* - * Ah what the heck, give this kid a taste of the real - * world and yank the rug out from under it. - * But, only if we are running UniProcessor. - */ - if ((kslice) && (ncpus == 1)) { - aston(t); - cp->cpu_runrun = 1; - cp->cpu_kprunrun = 1; - } -#endif if (!exiting) mutex_exit(plockp); - } while ((cp = cp->cpu_next) != cpu_list); + } while ((cp = cp->cpu_next) != clock_cpu_list); + + clock_cpu_list = clock_cpu_list->cpu_next; /* * bump time in ticks @@ -683,6 +670,9 @@ clock(void) if ((funcp = cmm_clock_callout) != NULL) (*funcp)(); + if ((funcp = cpucaps_clock_callout) != NULL) + (*funcp)(); + /* * Wakeup the cageout thread waiters once per second. */ |