mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-04 21:31:51 +00:00
srcu: Remove checks preventing offline CPUs from calling srcu_read_lock()
SRCU has its own statemachine and no longer relies on normal RCU.
Its read-side critical section can now be used by an offline CPU, so this
commit removes the check and the comments, reverting the SRCU portion
of c0d6d01b
(rcu: Check for illegal use of RCU from offlined CPUs).
It also makes the code match the comments in whatisRCU.txt:
g. Do you need read-side critical sections that are respected
even though they are in the middle of the idle loop, during
user-mode execution, or on an offlined CPU? If so, SRCU is the
only choice that will work for you.
[ paulmck: There is at least one remaining issue, namely use of lockdep
with tracing enabled. ]
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
This commit is contained in:
parent
ab4d2986e4
commit
3bc97a782c
1 changed files with 0 additions and 5 deletions
|
@ -163,9 +163,6 @@ void srcu_barrier(struct srcu_struct *sp);
|
||||||
* power mode. This way we can notice an extended quiescent state to
|
* power mode. This way we can notice an extended quiescent state to
|
||||||
* other CPUs that started a grace period. Otherwise we would delay any
|
* other CPUs that started a grace period. Otherwise we would delay any
|
||||||
* grace period as long as we run in the idle task.
|
* grace period as long as we run in the idle task.
|
||||||
*
|
|
||||||
* Similarly, we avoid claiming an SRCU read lock held if the current
|
|
||||||
* CPU is offline.
|
|
||||||
*/
|
*/
|
||||||
static inline int srcu_read_lock_held(struct srcu_struct *sp)
|
static inline int srcu_read_lock_held(struct srcu_struct *sp)
|
||||||
{
|
{
|
||||||
|
@ -173,8 +170,6 @@ static inline int srcu_read_lock_held(struct srcu_struct *sp)
|
||||||
return 1;
|
return 1;
|
||||||
if (rcu_is_cpu_idle())
|
if (rcu_is_cpu_idle())
|
||||||
return 0;
|
return 0;
|
||||||
if (!rcu_lockdep_current_cpu_online())
|
|
||||||
return 0;
|
|
||||||
return lock_is_held(&sp->dep_map);
|
return lock_is_held(&sp->dep_map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue