[Cbe-oss-dev] [PATCH 2:3] spusched: fix visibility issue with context switch pending flag

Christoph Hellwig hch at lst.de
Fri Apr 25 18:27:45 EST 2008


On Thu, Apr 24, 2008 at 08:04:08PM -0300, Luke Browning wrote:
> Fix the serialization of the flag SPU_CONTEXT_SWITCH_PENDING
> 
> synchronize_irq() provides the serialization for this flag which
> is read with a simple load. This routine guarantees that the relevant
> interrupt handlers are not running, so that the next time they do run 
> they will see the update memory value. 
> 
> This must be done correctly so that exception handling code does not 
> restart the mfc in the middle of a context switch while we are trying 
> to atomically stop it and save state. 

Looks good.




More information about the cbe-oss-dev mailing list