History

Merge branches 'consolidate.2019.04.09a', 'doc.2019.03.26b', 'fixes.2019.03.26b', 'srcu.2019.03.26b', 'stall.2019.03.26b' and 'torture.2019.03.26b' into HEAD

consolidate.2019.04.09a: Lingering RCU flavor consolidation cleanups. doc.2019.03.26b: Documentation updates. fixes.2019.03.26b: Miscellaneous fixes. srcu.2019.03.26b: SRCU updates. stall.2019.03.26b: RCU CPU stall warning updates. torture.2019.03.26b: Torture-test updates.

Paul E. McKenney committed 7 years ago

Commit 6cdbc076 parents bee58fe 884b429 add0d37 f5ad399 6c70e9c 164a4da51 files · +1081 −1272Browse files

Showing the changes to include/linux (2 of 51 files). Show all

Unified · Split

2 files
  1. include/linux/rcupdate.h +4 −2
  2. include/linux/srcu.h +1 −35
include/linux/rcupdate.h+4−2
@@ -878,9 +878,11 @@ static inline void rcu_head_init(struct rcu_head *rhp) · 877 unmodified lines
878878 static inline bool
879879 rcu_head_after_call_rcu(struct rcu_head *rhp, rcu_callback_t f)
880880 {
881− if (READ_ONCE(rhp->func) == f)
881+ rcu_callback_t func = READ_ONCE(rhp->func);
882+
883+ if (func == f)
882884 return true;
883− WARN_ON_ONCE(READ_ONCE(rhp->func) != (rcu_callback_t)~0L);
885+ WARN_ON_ONCE(func != (rcu_callback_t)~0L);
884886 return false;
885887 }
886888
include/linux/srcu.h+1−35
@@ -56,45 +56,11 @@ struct srcu_struct { }; · 55 unmodified lines
5656
5757 void call_srcu(struct srcu_struct *ssp, struct rcu_head *head,
5858 void (*func)(struct rcu_head *head));
59−void _cleanup_srcu_struct(struct srcu_struct *ssp, bool quiesced);
59+void cleanup_srcu_struct(struct srcu_struct *ssp);
6060 int __srcu_read_lock(struct srcu_struct *ssp) __acquires(ssp);
6161 void __srcu_read_unlock(struct srcu_struct *ssp, int idx) __releases(ssp);
6262 void synchronize_srcu(struct srcu_struct *ssp);
6363
64−/**
65− * cleanup_srcu_struct - deconstruct a sleep-RCU structure
66− * @ssp: structure to clean up.
67− *
68− * Must invoke this after you are finished using a given srcu_struct that
69− * was initialized via init_srcu_struct(), else you leak memory.
70− */
71−static inline void cleanup_srcu_struct(struct srcu_struct *ssp)
72−{
73− _cleanup_srcu_struct(ssp, false);
74−}
75−
76−/**
77− * cleanup_srcu_struct_quiesced - deconstruct a quiesced sleep-RCU structure
78− * @ssp: structure to clean up.
79− *
80− * Must invoke this after you are finished using a given srcu_struct that
81− * was initialized via init_srcu_struct(), else you leak memory. Also,
82− * all grace-period processing must have completed.
83− *
84− * "Completed" means that the last synchronize_srcu() and
85− * synchronize_srcu_expedited() calls must have returned before the call
86− * to cleanup_srcu_struct_quiesced(). It also means that the callback
87− * from the last call_srcu() must have been invoked before the call to
88− * cleanup_srcu_struct_quiesced(), but you can use srcu_barrier() to help
89− * with this last. Violating these rules will get you a WARN_ON() splat
90− * (with high probability, anyway), and will also cause the srcu_struct
91− * to be leaked.
92− */
93−static inline void cleanup_srcu_struct_quiesced(struct srcu_struct *ssp)
94−{
95− _cleanup_srcu_struct(ssp, true);
96−}
97−
9864 #ifdef CONFIG_DEBUG_LOCK_ALLOC
9965
10066 /**

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t