Re: [PATCH] rcu: Remove redundant rcu_read_lock/unlock() in spin_lock critical sections

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

 



On 2025-09-12 17:13:09 [-0400], Waiman Long wrote:
> On 9/12/25 2:50 AM, pengdonglin wrote:
> > From: pengdonglin <pengdonglin@xxxxxxxxxx>
> > 
> > When CONFIG_PREEMPT_RT is disabled, spin_lock*() operations implicitly
> > disable preemption, which provides RCU read-side protection. When
> > CONFIG_PREEMPT_RT is enabled, spin_lock*() implementations internally
> > manage RCU read-side critical sections.
> 
> I have some doubt about your claim that disabling preemption provides RCU
> read-side protection. It is true for some flavors but probably not all. I do
> know that disabling interrupt will provide RCU read-side protection. So for
> spin_lock_irq*() calls, that is valid. I am not sure about spin_lock_bh(),
> maybe it applies there too. we need some RCU people to confirm.

The claim is valid since Paul merged the three flavours we had. Before
that preempt_disable() (and disabling irqs) would match
rcu_read_lock_sched(). rcu_read_lock() and rcu_read_lock_bh() were
different in terms of grace period and clean up.
So _now_ we could remove it if it makes things easier.

> Cheers,
> Longman

Sebastian




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux