diff options
author | tegge <tegge@FreeBSD.org> | 1998-05-17 22:12:14 +0000 |
---|---|---|
committer | tegge <tegge@FreeBSD.org> | 1998-05-17 22:12:14 +0000 |
commit | 4347025be3ee2eaf0c12f7838df60ccaad126267 (patch) | |
tree | 35c785e270e1950f43a8dd00138cc297f3c02026 /sys/kern/kern_synch.c | |
parent | 902ca8e68b9388df5776d79f4fe4a9f26c7c8577 (diff) | |
download | FreeBSD-src-4347025be3ee2eaf0c12f7838df60ccaad126267.zip FreeBSD-src-4347025be3ee2eaf0c12f7838df60ccaad126267.tar.gz |
Add forwarding of roundrobin to other cpus. This gives a more regular
update of cpu usage as shown by top when one process is cpu bound
(no system calls) while the system is otherwise idle (except for top).
Don't attempt to switch to the BSP in boot(). If the system was idle when
an interrupt caused a panic, this won't work. Instead, switch to the BSP
in cpu_reset.
Remove some spurious forward_statclock/forward_hardclock warnings.
Diffstat (limited to 'sys/kern/kern_synch.c')
-rw-r--r-- | sys/kern/kern_synch.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index cd3ef44..342cb3a 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_synch.c 8.9 (Berkeley) 5/19/95 - * $Id: kern_synch.c,v 1.54 1998/04/04 13:25:20 phk Exp $ + * $Id: kern_synch.c,v 1.55 1998/05/17 11:52:45 phk Exp $ */ #include "opt_ktrace.h" @@ -57,6 +57,10 @@ #endif #include <machine/cpu.h> +#ifdef SMP +#include <machine/smp.h> +#endif +#include <machine/ipl.h> #include <machine/limits.h> /* for UCHAR_MAX = typeof(p_priority)_MAX */ static void rqinit __P((void *)); @@ -130,8 +134,13 @@ roundrobin(arg) { struct proc *p = curproc; /* XXX */ +#ifdef SMP + need_resched(); + forward_roundrobin(); +#else if (p == 0 || RTP_PRIO_NEED_RR(p->p_rtprio.type)) need_resched(); +#endif timeout(roundrobin, NULL, ROUNDROBIN_INTERVAL); } |