Skip to content

Commit cbd5d35

Browse files
paulmckrcuNeeraj Upadhyay (AMD)
authored andcommitted
torture: Remove support for SRCU-lite
Because SRCU-lite is being replaced by SRCU-fast, this commit removes support for SRCU-lite from refscale.c. Both SRCU-lite and SRCU-fast provide faster readers by dropping the smp_mb() call from their lock and unlock primitives, but incur a pair of added RCU grace periods during the SRCU grace period. There is a trivial mapping from the SRCU-lite API to that of SRCU-fast, so there should be no transition issues. [ paulmck: Apply Christoph Hellwig feedback. ] Signed-off-by: "Paul E. McKenney" <[email protected]> Signed-off-by: Neeraj Upadhyay (AMD) <[email protected]>
1 parent 748d792 commit cbd5d35

File tree

1 file changed

+1
-31
lines changed

1 file changed

+1
-31
lines changed

kernel/rcu/refscale.c

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -246,36 +246,6 @@ static const struct ref_scale_ops srcu_fast_ops = {
246246
.name = "srcu-fast"
247247
};
248248

249-
static void srcu_lite_ref_scale_read_section(const int nloops)
250-
{
251-
int i;
252-
int idx;
253-
254-
for (i = nloops; i >= 0; i--) {
255-
idx = srcu_read_lock_lite(srcu_ctlp);
256-
srcu_read_unlock_lite(srcu_ctlp, idx);
257-
}
258-
}
259-
260-
static void srcu_lite_ref_scale_delay_section(const int nloops, const int udl, const int ndl)
261-
{
262-
int i;
263-
int idx;
264-
265-
for (i = nloops; i >= 0; i--) {
266-
idx = srcu_read_lock_lite(srcu_ctlp);
267-
un_delay(udl, ndl);
268-
srcu_read_unlock_lite(srcu_ctlp, idx);
269-
}
270-
}
271-
272-
static const struct ref_scale_ops srcu_lite_ops = {
273-
.init = rcu_sync_scale_init,
274-
.readsection = srcu_lite_ref_scale_read_section,
275-
.delaysection = srcu_lite_ref_scale_delay_section,
276-
.name = "srcu-lite"
277-
};
278-
279249
#ifdef CONFIG_TASKS_RCU
280250

281251
// Definitions for RCU Tasks ref scale testing: Empty read markers.
@@ -1193,7 +1163,7 @@ ref_scale_init(void)
11931163
long i;
11941164
int firsterr = 0;
11951165
static const struct ref_scale_ops *scale_ops[] = {
1196-
&rcu_ops, &srcu_ops, &srcu_fast_ops, &srcu_lite_ops, RCU_TRACE_OPS RCU_TASKS_OPS
1166+
&rcu_ops, &srcu_ops, &srcu_fast_ops, RCU_TRACE_OPS RCU_TASKS_OPS
11971167
&refcnt_ops, &rwlock_ops, &rwsem_ops, &lock_ops, &lock_irq_ops,
11981168
&acqrel_ops, &sched_clock_ops, &clock_ops, &jiffies_ops,
11991169
&typesafe_ref_ops, &typesafe_lock_ops, &typesafe_seqlock_ops,

0 commit comments

Comments
 (0)