Subject: Re: Restartable Atomic Sequences
To: Jason R Thorpe <thorpej@wasabisystems.com>
From: Gregory McGarry <g.mcgarry@ieee.org>
List: tech-kern
Date: 08/25/2002 11:36:28
Jason R Thorpe wrote:
 
>  > The MI implementation can be found here:
>  > 
>  > 	ftp://ftp.netbsd.org/pub/NetBSD/misc/gmcgarry/
>  > 
>  > Includes support for mips, m68k and i386.  The man pages discuss
>  > most of the issues.  Would appreciate comments before moving forward.
> 
> Looks good, at first read-through.  The only comment I have so far
> is that the splhigh()/splx() when holding p_raslock seems unnecessary;
> I don't see where the p_raslist is accessed from an interrupt context.

I'm sure you're just itching to hear the story behind this one.

Originally, I did the mips work which allowed an atomic sequence
to be restarted on any preemption or interrupt/exception.  Restarting
on an interrupt is easy on mips, since there is only two possible
entry points.  Seems like a simple generalisation, although I
wasn't ever able to justify it with a good practical reason.  The
closest I came was an example of profiling some short code sequence.
Would also be useful though for atomic sequences inside the kernel.
i386 was a little harder, but still possible.  m68k convinced me to
only restart on preemption.

I removed the interrupt fiddling.

	-- Gregory McGarry <g.mcgarry@ieee.org>