On Thu, Apr 16, 2020 at 04:36:37PM -0400, Joel Fernandes wrote: > On Thu, Apr 16, 2020 at 03:26:23PM -0400, Steven Rostedt wrote: > > On Thu, 16 Apr 2020 14:59:34 -0400 > > Joel Fernandes <joel@xxxxxxxxxxxxxxxxx> wrote: > > > > > But, then will it be safe for kfree_rcu() callers from hard IRQ context to > > > call this in PREEMPT_RT? That could would just break then as you cannot sleep > > > in hard IRQ context even on PREEMPT_RT. > > > > But where in PREEMPT_RT would it be called in hard IRQ context? > > I am not saying that it is called now, but in the future if it is called for > an interrupt that is not threaded on -rt, it would be a problem right? > > > Note, most interrupt handlers in PREEMPT_RT are turned into threads (except > > for a very few, which shouldn't be calling kfree_rcu()). > > Yes those very few is what I was referring to. It also sounds like from the > other thread, Paul is saying it should be allowed to be called from some > contexts that are not sleepable. In those cases also the rtmutex will fall > apart. We might need different calling-context restrictions for the two variants of kfree_rcu(). And we might need to come up with some sort of lockdep check for "safe to use normal spinlock in -rt". Thanx, Paul