Re: [RFC][PATCH RT 0/3] RT: Fix trylock deadlock without msleep() hack

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

 



On Sat, 5 Sep 2015 08:18:36 -0400
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> On Sat, 5 Sep 2015 12:30:59 +0200 (CEST)
> Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
> > 
> > So instead of doing that proposed magic boost, we can do something
> > more straight forward:
> > 
> > retry:
> > 	lock(B);
> > 	if (!try_lock(A)) {
> > 		lock_and_drop(A, B);
> > 		unlock(A);
> > 		goto retry;
> > 	}
> > 
> > lock_and_drop() queues the task as a waiter on A, drops B and then
> > does the PI adjustment on A. 
> 
> That was my original solution, and I believe I added patches to do
> exactly that to the networking code in the past. I remember writing
> that helper function such that on non PREEMPT_RT it was a nop.

Just to point out again that I misread what you wrote. That's what I
get for responding to email 10 minutes after I get out of bed ;-)


You need to be careful about adding the waiter on A. If the owner of A
is blocked on B, the pi inheritance may detect that as a deadlock.

-- 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