Re: Query about might_sleep()

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

 



Steven,

> In -rt, we convert all spin_locks() into rt_mutex() which means they
> might sleep on contention. We do not convert raw_spin_locks(), they
> stay the same both in mainline and -rt.
>
> The following is OK:
>
>   rt_mutex()
>     __might_sleep()
>     some_function()
>       local_irq_save()
>       local_irq_restore()
>
> Indention show what calls what.
>
> But if you have:
>
>   local_irq_save()
>   some_function();
>     rt_mutex();
>   local_irq_restore();
>
> Now the above *is* a bug.
>
> Is that what you are asking?
>

I think I quoted my example incorrectly.

I put it across as a stack trace, rather than the way you've put it across.
Here's what I had in mind,

local_irq_save();
  some_function();
      rt_spin_lock() --> this calls __might_sleep
local_irq_restore(); --> In this case there's a bug right?


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