Subject: SMP-related process state changes
To: None <firstname.lastname@example.org>
From: Jason R Thorpe <email@example.com>
Date: 05/24/2000 18:18:12
In order to support running processes on multiple processors, we
need to add another process state. The problem is that the SRUN
state currently implies both `runnable' (i.e. on a run queue) and
`running' (i.e. not on a run queue, but rather is curproc).
Several places in the kernel check against (SRUN && curproc) or
(SRUN && !curproc) or test curproc when they really mean "is the
The change is to add a new state SONPROC (name taken from Solaris)
which means "process is executing on a processor". This relegates
SRUN to mean "on a run queue".
The changes are fairly simple, but do require a small change to
every port's context switch code. I have made all of the necessary
changes, and as soon as I get replies on my sanity check from some
people, I'll be committing them.
No kmem-grovelers should be broken by this; I didn't change the size
or layout of struct proc in any way, merely added a new state. Obviously
old programs will not know about this state, but currently, only one
process at any given time will be in this state, so it's not too
I'm going to commit these just before I commit the scheduler variable
rearragement, and then bump the NetBSD version after the variable
-- Jason R. Thorpe <firstname.lastname@example.org>