[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CAS and spinlocks (was: Re: [f-cpu] another DATE report)



On Mon, Mar 18, 2002 at 10:32:10PM +0100, Christophe wrote:
[...]
> Yes but do you agree that you still need to disable interrupts (something you
> forget to do in your example) to prevent your sequence from an undesirable
> preemptive task switch ? it is not a hazard that Linux does it for its
> spinlocks.

I was in kernel mode for a moment... things are a little different
there. You don't need to turn off interrupts in certain cases, for
instance, because a task switch can not happen (but another task, on
another CPU, can modify your data).

> I think to have a single CAS is a minimum. To have a CAS2 can really boost
> compared with its software implementation. But, ok, let us first to try to have
> an efficient CAS. Afterward we can try the impossible :-)

That comes second. First, let's build something that *works*.

-- 
 Michael "Tired" Riepe <Michael.Riepe@stud.uni-hannover.de>
 "All I wanna do is have a little fun before I die"
*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/