@@ -216,6 +216,36 @@ static const struct ref_scale_ops srcu_ops = {
216
216
.name = "srcu"
217
217
};
218
218
219
+ static void srcu_fast_ref_scale_read_section (const int nloops )
220
+ {
221
+ int i ;
222
+ struct srcu_ctr __percpu * scp ;
223
+
224
+ for (i = nloops ; i >= 0 ; i -- ) {
225
+ scp = srcu_read_lock_fast (srcu_ctlp );
226
+ srcu_read_unlock_fast (srcu_ctlp , scp );
227
+ }
228
+ }
229
+
230
+ static void srcu_fast_ref_scale_delay_section (const int nloops , const int udl , const int ndl )
231
+ {
232
+ int i ;
233
+ struct srcu_ctr __percpu * scp ;
234
+
235
+ for (i = nloops ; i >= 0 ; i -- ) {
236
+ scp = srcu_read_lock_fast (srcu_ctlp );
237
+ un_delay (udl , ndl );
238
+ srcu_read_unlock_fast (srcu_ctlp , scp );
239
+ }
240
+ }
241
+
242
+ static const struct ref_scale_ops srcu_fast_ops = {
243
+ .init = rcu_sync_scale_init ,
244
+ .readsection = srcu_fast_ref_scale_read_section ,
245
+ .delaysection = srcu_fast_ref_scale_delay_section ,
246
+ .name = "srcu-fast"
247
+ };
248
+
219
249
static void srcu_lite_ref_scale_read_section (const int nloops )
220
250
{
221
251
int i ;
@@ -1163,7 +1193,7 @@ ref_scale_init(void)
1163
1193
long i ;
1164
1194
int firsterr = 0 ;
1165
1195
static const struct ref_scale_ops * scale_ops [] = {
1166
- & rcu_ops , & srcu_ops , & srcu_lite_ops , RCU_TRACE_OPS RCU_TASKS_OPS
1196
+ & rcu_ops , & srcu_ops , & srcu_fast_ops , & srcu_lite_ops , RCU_TRACE_OPS RCU_TASKS_OPS
1167
1197
& refcnt_ops , & rwlock_ops , & rwsem_ops , & lock_ops , & lock_irq_ops ,
1168
1198
& acqrel_ops , & sched_clock_ops , & clock_ops , & jiffies_ops ,
1169
1199
& typesafe_ref_ops , & typesafe_lock_ops , & typesafe_seqlock_ops ,
0 commit comments