lkml.org 
[lkml]   [2023]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 2/3] sched/task: Add the put_task_struct_atomic_safe() function
On Mon, 24 Apr 2023 11:52:52 -0700
"Paul E. McKenney" <paulmck@kernel.org> 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

\
 
 \ /
  Last update: 2023-04-24 22:36    [W:0.048 / U:25.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site