lkml.org 
[lkml]   [2023]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Internal vs. external barriers (was: Re: Interesting LKMM litmus test)
On Thu, Jan 12, 2023 at 01:57:16PM -0800, Paul E. McKenney wrote:

> I will risk sharing the intuition behind the rcu-order counting rule.
>
> In the code, an RCU read-side critical section begins with rcu_read_lock()
> and ends with the matching rcu_read_unlock(). RCU read-side critical
> section may be nested, in which case RCU cares only about the outermost
> of the nested set.
>
> An RCU grace period includes at least one moment in time during which
> each and every process/CPU/task/whatever is not within an RCU read-side
> critical section.

Strictly speaking, this is not right. It should say: For each
process/CPU/task/whatever, an RCU grace period includes at least one
moment in time during which that process is not within an RCU read-side
critical section. There does not have to be any single moment during
which no processes are executing a critical section.

For example, the following is acceptable:

CPU 0: start of synchronize_rcu()......end
CPU 1: rcu_lock().....................rcu_unlock()
CPU 2: rcu_lock().......................rcu_unlock()

Alan

\
 
 \ /
  Last update: 2023-03-26 23:39    [W:0.176 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site