Re: [PATCH v6 2/3] sched/task: Add the put_task_struct_atomic_safe() function
From: Steven Rostedt
Date: Mon Apr 24 2023 - 16:35:00 EST
On Mon, 24 Apr 2023 11:52:52 -0700
"Paul E. McKenney" <paulmck@xxxxxxxxxx> wrote:
> > softirqs execute in thread context in PREEMPT_RT. We are good here.
>
> So the sleeping lock is a spinlock rather than (say) a mutex?
local_bh_disable() on RT basically turns into:
local_lock(&softirq_ctrl.lock);
rcu_read_lock();
Which grabs a per CPU mutex that is taken by softirqs, and also calls
rcu_read_lock(). This allows bottom halves to still run as threads but
maintain the same synchronization as they do on mainline.
-- Steve