Subject: Re: halving context switch time
To: David Laight <david@l8s.co.uk>
From: Chuck Silvers <chuq@chuq.com>
List: tech-perform
Date: 09/02/2002 10:30:06
On Mon, Sep 02, 2002 at 09:09:28AM +0100, David Laight wrote:
> > to allow giving cpu_switch() a return value without needing to
> > change all the instances at once, we could just conditionalize
> > that part of mi_switch() on __HAVE_CPU_SWITCH_RETVAL or something
> > like that, so we can convert each instance of cpu_switch()
> > independently.  as for the SA code also adding a return value
> > to cpu_switch(), we could just have it return two bits, one bit
> > for if the current process is the same as the last process,
> > and a different bit for whether or not cpu_switch() slept.
> 
> I think this can be done without requiring an incompatible change
> to the interface to mi_switch - and hence without requiring all
> the ports be changed at once.
> 
> I think the only call to cpu_switch is from mi_switch, as such
> its current return value (the proc pointer) is never actually
> used.  This means that the botton 2 bits of the return value
> are currently always zero.

actually, cpu_switch() currently returns void, look in sys/proc.h.
the x86 implementation is confused.  :-)

-Chuck