Re: workqueue code needing preemption disabled

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

 



On Mon, 2013-03-18 at 12:27 -0400, Steven Rostedt wrote:

> IOW, what can happen in -rt here is:
> 
> 	spin_lock_irq(&gcwq->lock);
> 	[...]
> 	<interrupt>
> 		-> preempt_schedule();
> 		   schedule();
> 		   try_to_wake_up_local();
> 
> 	[...]
> 	spin_unlock_irq(&gcwq->lock);
> 
> Again, with -rt, spin_lock_irq() does not prevent interrupts nor
> preemption.

If you happen to know the critical areas that require preemption to be
disabled for real, we can encapsulate them with:

	preempt_disable_rt();

	preempt_enable_rt();

These are currently only in the -rt patch, but it annotates locations
that require preemption to be disabled even when -rt converts spin_locks
into mutexes. These obviously can not contain spin_locks() as
spin_locks() can block and schedule out.

-- Steve


--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux