@@ -212,6 +212,36 @@ static const struct ref_scale_ops srcu_ops = {
212
212
.name = "srcu"
213
213
};
214
214
215
+ static void srcu_lite_ref_scale_read_section (const int nloops )
216
+ {
217
+ int i ;
218
+ int idx ;
219
+
220
+ for (i = nloops ; i >= 0 ; i -- ) {
221
+ idx = srcu_read_lock_lite (srcu_ctlp );
222
+ srcu_read_unlock_lite (srcu_ctlp , idx );
223
+ }
224
+ }
225
+
226
+ static void srcu_lite_ref_scale_delay_section (const int nloops , const int udl , const int ndl )
227
+ {
228
+ int i ;
229
+ int idx ;
230
+
231
+ for (i = nloops ; i >= 0 ; i -- ) {
232
+ idx = srcu_read_lock_lite (srcu_ctlp );
233
+ un_delay (udl , ndl );
234
+ srcu_read_unlock_lite (srcu_ctlp , idx );
235
+ }
236
+ }
237
+
238
+ static const struct ref_scale_ops srcu_lite_ops = {
239
+ .init = rcu_sync_scale_init ,
240
+ .readsection = srcu_lite_ref_scale_read_section ,
241
+ .delaysection = srcu_lite_ref_scale_delay_section ,
242
+ .name = "srcu-lite"
243
+ };
244
+
215
245
#ifdef CONFIG_TASKS_RCU
216
246
217
247
// Definitions for RCU Tasks ref scale testing: Empty read markers.
@@ -1082,9 +1112,10 @@ ref_scale_init(void)
1082
1112
long i ;
1083
1113
int firsterr = 0 ;
1084
1114
static const struct ref_scale_ops * scale_ops [] = {
1085
- & rcu_ops , & srcu_ops , RCU_TRACE_OPS RCU_TASKS_OPS & refcnt_ops , & rwlock_ops ,
1086
- & rwsem_ops , & lock_ops , & lock_irq_ops , & acqrel_ops , & clock_ops , & jiffies_ops ,
1087
- & typesafe_ref_ops , & typesafe_lock_ops , & typesafe_seqlock_ops ,
1115
+ & rcu_ops , & srcu_ops , & srcu_lite_ops , RCU_TRACE_OPS RCU_TASKS_OPS
1116
+ & refcnt_ops , & rwlock_ops , & rwsem_ops , & lock_ops , & lock_irq_ops , & acqrel_ops ,
1117
+ & clock_ops , & jiffies_ops , & typesafe_ref_ops , & typesafe_lock_ops ,
1118
+ & typesafe_seqlock_ops ,
1088
1119
};
1089
1120
1090
1121
if (!torture_init_begin (scale_type , verbose ))
0 commit comments