History

refperf: Add test for RCU Tasks readers

This commit adds testing for RCU Tasks readers to the refperf module. This also applies to RCU Rude readers, as both flavors have empty (as in non-existent) read-side markers.

Paul E. McKenney committed 6 years ago

Commit e13ef441 parent 72bb7491 file · +27 −1Browse files

Unified · Split

kernel/rcu/refperf.c+27−1
@@ -192,6 +192,31 @@ static struct ref_perf_ops srcu_ops = { · 191 unmodified lines
192 .name = "srcu"192 .name = "srcu"
193};193};
194 194
195// Definitions for RCU Tasks ref perf testing: Empty read markers.
196// These definitions also work for RCU Rude readers.
197static void rcu_tasks_ref_perf_read_section(const int nloops)
198{
199 int i;
200
201 for (i = nloops; i >= 0; i--)
202 continue;
203}
204
205static void rcu_tasks_ref_perf_delay_section(const int nloops, const int udl, const int ndl)
206{
207 int i;
208
209 for (i = nloops; i >= 0; i--)
210 un_delay(udl, ndl);
211}
212
213static struct ref_perf_ops rcu_tasks_ops = {
214 .init = rcu_sync_perf_init,
215 .readsection = rcu_tasks_ref_perf_read_section,
216 .delaysection = rcu_tasks_ref_perf_delay_section,
217 .name = "rcu-tasks"
218};
219
195// Definitions for RCU Tasks Trace ref perf testing.220// Definitions for RCU Tasks Trace ref perf testing.
196static void rcu_trace_ref_perf_read_section(const int nloops)221static void rcu_trace_ref_perf_read_section(const int nloops)
197{222{
@@ -613,7 +638,8 @@ ref_perf_init(void) · 415 unmodified lines
613 long i;638 long i;
614 int firsterr = 0;639 int firsterr = 0;
615 static struct ref_perf_ops *perf_ops[] = {640 static struct ref_perf_ops *perf_ops[] = {
616 &rcu_ops, &srcu_ops, &rcu_trace_ops, &refcnt_ops, &rwlock_ops, &rwsem_ops,641 &rcu_ops, &srcu_ops, &rcu_trace_ops, &rcu_tasks_ops,
642 &refcnt_ops, &rwlock_ops, &rwsem_ops,
617 };643 };
618 644
619 if (!torture_init_begin(perf_type, verbose))645 if (!torture_init_begin(perf_type, verbose))

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