rcuperf.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643
  1. /*
  2. * Read-Copy Update module-based performance-test facility
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, you can access it online at
  16. * http://www.gnu.org/licenses/gpl-2.0.html.
  17. *
  18. * Copyright (C) IBM Corporation, 2015
  19. *
  20. * Authors: Paul E. McKenney <paulmck@us.ibm.com>
  21. */
  22. #include <linux/types.h>
  23. #include <linux/kernel.h>
  24. #include <linux/init.h>
  25. #include <linux/module.h>
  26. #include <linux/kthread.h>
  27. #include <linux/err.h>
  28. #include <linux/spinlock.h>
  29. #include <linux/smp.h>
  30. #include <linux/rcupdate.h>
  31. #include <linux/interrupt.h>
  32. #include <linux/sched.h>
  33. #include <linux/atomic.h>
  34. #include <linux/bitops.h>
  35. #include <linux/completion.h>
  36. #include <linux/moduleparam.h>
  37. #include <linux/percpu.h>
  38. #include <linux/notifier.h>
  39. #include <linux/reboot.h>
  40. #include <linux/freezer.h>
  41. #include <linux/cpu.h>
  42. #include <linux/delay.h>
  43. #include <linux/stat.h>
  44. #include <linux/srcu.h>
  45. #include <linux/slab.h>
  46. #include <asm/byteorder.h>
  47. #include <linux/torture.h>
  48. #include <linux/vmalloc.h>
  49. MODULE_LICENSE("GPL");
  50. MODULE_AUTHOR("Paul E. McKenney <paulmck@linux.vnet.ibm.com>");
  51. #define PERF_FLAG "-perf:"
  52. #define PERFOUT_STRING(s) \
  53. pr_alert("%s" PERF_FLAG s "\n", perf_type)
  54. #define VERBOSE_PERFOUT_STRING(s) \
  55. do { if (verbose) pr_alert("%s" PERF_FLAG " %s\n", perf_type, s); } while (0)
  56. #define VERBOSE_PERFOUT_ERRSTRING(s) \
  57. do { if (verbose) pr_alert("%s" PERF_FLAG "!!! %s\n", perf_type, s); } while (0)
  58. torture_param(bool, gp_exp, true, "Use expedited GP wait primitives");
  59. torture_param(int, nreaders, -1, "Number of RCU reader threads");
  60. torture_param(int, nwriters, -1, "Number of RCU updater threads");
  61. torture_param(bool, shutdown, false, "Shutdown at end of performance tests.");
  62. torture_param(bool, verbose, true, "Enable verbose debugging printk()s");
  63. static char *perf_type = "rcu";
  64. module_param(perf_type, charp, 0444);
  65. MODULE_PARM_DESC(perf_type, "Type of RCU to performance-test (rcu, rcu_bh, ...)");
  66. static int nrealreaders;
  67. static int nrealwriters;
  68. static struct task_struct **writer_tasks;
  69. static struct task_struct **reader_tasks;
  70. static struct task_struct *shutdown_task;
  71. static u64 **writer_durations;
  72. static int *writer_n_durations;
  73. static atomic_t n_rcu_perf_reader_started;
  74. static atomic_t n_rcu_perf_writer_started;
  75. static atomic_t n_rcu_perf_writer_finished;
  76. static wait_queue_head_t shutdown_wq;
  77. static u64 t_rcu_perf_writer_started;
  78. static u64 t_rcu_perf_writer_finished;
  79. static unsigned long b_rcu_perf_writer_started;
  80. static unsigned long b_rcu_perf_writer_finished;
  81. static int rcu_perf_writer_state;
  82. #define RTWS_INIT 0
  83. #define RTWS_EXP_SYNC 1
  84. #define RTWS_SYNC 2
  85. #define RTWS_IDLE 2
  86. #define RTWS_STOPPING 3
  87. #define MAX_MEAS 10000
  88. #define MIN_MEAS 100
  89. #if defined(MODULE) || defined(CONFIG_RCU_PERF_TEST_RUNNABLE)
  90. #define RCUPERF_RUNNABLE_INIT 1
  91. #else
  92. #define RCUPERF_RUNNABLE_INIT 0
  93. #endif
  94. static int perf_runnable = RCUPERF_RUNNABLE_INIT;
  95. module_param(perf_runnable, int, 0444);
  96. MODULE_PARM_DESC(perf_runnable, "Start rcuperf at boot");
  97. /*
  98. * Operations vector for selecting different types of tests.
  99. */
  100. struct rcu_perf_ops {
  101. int ptype;
  102. void (*init)(void);
  103. void (*cleanup)(void);
  104. int (*readlock)(void);
  105. void (*readunlock)(int idx);
  106. unsigned long (*started)(void);
  107. unsigned long (*completed)(void);
  108. unsigned long (*exp_completed)(void);
  109. void (*sync)(void);
  110. void (*exp_sync)(void);
  111. const char *name;
  112. };
  113. static struct rcu_perf_ops *cur_ops;
  114. /*
  115. * Definitions for rcu perf testing.
  116. */
  117. static int rcu_perf_read_lock(void) __acquires(RCU)
  118. {
  119. rcu_read_lock();
  120. return 0;
  121. }
  122. static void rcu_perf_read_unlock(int idx) __releases(RCU)
  123. {
  124. rcu_read_unlock();
  125. }
  126. static unsigned long __maybe_unused rcu_no_completed(void)
  127. {
  128. return 0;
  129. }
  130. static void rcu_sync_perf_init(void)
  131. {
  132. }
  133. static struct rcu_perf_ops rcu_ops = {
  134. .ptype = RCU_FLAVOR,
  135. .init = rcu_sync_perf_init,
  136. .readlock = rcu_perf_read_lock,
  137. .readunlock = rcu_perf_read_unlock,
  138. .started = rcu_batches_started,
  139. .completed = rcu_batches_completed,
  140. .exp_completed = rcu_exp_batches_completed,
  141. .sync = synchronize_rcu,
  142. .exp_sync = synchronize_rcu_expedited,
  143. .name = "rcu"
  144. };
  145. /*
  146. * Definitions for rcu_bh perf testing.
  147. */
  148. static int rcu_bh_perf_read_lock(void) __acquires(RCU_BH)
  149. {
  150. rcu_read_lock_bh();
  151. return 0;
  152. }
  153. static void rcu_bh_perf_read_unlock(int idx) __releases(RCU_BH)
  154. {
  155. rcu_read_unlock_bh();
  156. }
  157. static struct rcu_perf_ops rcu_bh_ops = {
  158. .ptype = RCU_BH_FLAVOR,
  159. .init = rcu_sync_perf_init,
  160. .readlock = rcu_bh_perf_read_lock,
  161. .readunlock = rcu_bh_perf_read_unlock,
  162. .started = rcu_batches_started_bh,
  163. .completed = rcu_batches_completed_bh,
  164. .exp_completed = rcu_exp_batches_completed_sched,
  165. .sync = synchronize_rcu_bh,
  166. .exp_sync = synchronize_rcu_bh_expedited,
  167. .name = "rcu_bh"
  168. };
  169. /*
  170. * Definitions for srcu perf testing.
  171. */
  172. DEFINE_STATIC_SRCU(srcu_ctl_perf);
  173. static struct srcu_struct *srcu_ctlp = &srcu_ctl_perf;
  174. static int srcu_perf_read_lock(void) __acquires(srcu_ctlp)
  175. {
  176. return srcu_read_lock(srcu_ctlp);
  177. }
  178. static void srcu_perf_read_unlock(int idx) __releases(srcu_ctlp)
  179. {
  180. srcu_read_unlock(srcu_ctlp, idx);
  181. }
  182. static unsigned long srcu_perf_completed(void)
  183. {
  184. return srcu_batches_completed(srcu_ctlp);
  185. }
  186. static void srcu_perf_synchronize(void)
  187. {
  188. synchronize_srcu(srcu_ctlp);
  189. }
  190. static void srcu_perf_synchronize_expedited(void)
  191. {
  192. synchronize_srcu_expedited(srcu_ctlp);
  193. }
  194. static struct rcu_perf_ops srcu_ops = {
  195. .ptype = SRCU_FLAVOR,
  196. .init = rcu_sync_perf_init,
  197. .readlock = srcu_perf_read_lock,
  198. .readunlock = srcu_perf_read_unlock,
  199. .started = NULL,
  200. .completed = srcu_perf_completed,
  201. .exp_completed = srcu_perf_completed,
  202. .sync = srcu_perf_synchronize,
  203. .exp_sync = srcu_perf_synchronize_expedited,
  204. .name = "srcu"
  205. };
  206. /*
  207. * Definitions for sched perf testing.
  208. */
  209. static int sched_perf_read_lock(void)
  210. {
  211. preempt_disable();
  212. return 0;
  213. }
  214. static void sched_perf_read_unlock(int idx)
  215. {
  216. preempt_enable();
  217. }
  218. static struct rcu_perf_ops sched_ops = {
  219. .ptype = RCU_SCHED_FLAVOR,
  220. .init = rcu_sync_perf_init,
  221. .readlock = sched_perf_read_lock,
  222. .readunlock = sched_perf_read_unlock,
  223. .started = rcu_batches_started_sched,
  224. .completed = rcu_batches_completed_sched,
  225. .exp_completed = rcu_exp_batches_completed_sched,
  226. .sync = synchronize_sched,
  227. .exp_sync = synchronize_sched_expedited,
  228. .name = "sched"
  229. };
  230. #ifdef CONFIG_TASKS_RCU
  231. /*
  232. * Definitions for RCU-tasks perf testing.
  233. */
  234. static int tasks_perf_read_lock(void)
  235. {
  236. return 0;
  237. }
  238. static void tasks_perf_read_unlock(int idx)
  239. {
  240. }
  241. static struct rcu_perf_ops tasks_ops = {
  242. .ptype = RCU_TASKS_FLAVOR,
  243. .init = rcu_sync_perf_init,
  244. .readlock = tasks_perf_read_lock,
  245. .readunlock = tasks_perf_read_unlock,
  246. .started = rcu_no_completed,
  247. .completed = rcu_no_completed,
  248. .sync = synchronize_rcu_tasks,
  249. .exp_sync = synchronize_rcu_tasks,
  250. .name = "tasks"
  251. };
  252. #define RCUPERF_TASKS_OPS &tasks_ops,
  253. static bool __maybe_unused torturing_tasks(void)
  254. {
  255. return cur_ops == &tasks_ops;
  256. }
  257. #else /* #ifdef CONFIG_TASKS_RCU */
  258. #define RCUPERF_TASKS_OPS
  259. static bool __maybe_unused torturing_tasks(void)
  260. {
  261. return false;
  262. }
  263. #endif /* #else #ifdef CONFIG_TASKS_RCU */
  264. /*
  265. * If performance tests complete, wait for shutdown to commence.
  266. */
  267. static void rcu_perf_wait_shutdown(void)
  268. {
  269. cond_resched_rcu_qs();
  270. if (atomic_read(&n_rcu_perf_writer_finished) < nrealwriters)
  271. return;
  272. while (!torture_must_stop())
  273. schedule_timeout_uninterruptible(1);
  274. }
  275. /*
  276. * RCU perf reader kthread. Repeatedly does empty RCU read-side
  277. * critical section, minimizing update-side interference.
  278. */
  279. static int
  280. rcu_perf_reader(void *arg)
  281. {
  282. unsigned long flags;
  283. int idx;
  284. long me = (long)arg;
  285. VERBOSE_PERFOUT_STRING("rcu_perf_reader task started");
  286. set_cpus_allowed_ptr(current, cpumask_of(me % nr_cpu_ids));
  287. set_user_nice(current, MAX_NICE);
  288. atomic_inc(&n_rcu_perf_reader_started);
  289. do {
  290. local_irq_save(flags);
  291. idx = cur_ops->readlock();
  292. cur_ops->readunlock(idx);
  293. local_irq_restore(flags);
  294. rcu_perf_wait_shutdown();
  295. } while (!torture_must_stop());
  296. torture_kthread_stopping("rcu_perf_reader");
  297. return 0;
  298. }
  299. /*
  300. * RCU perf writer kthread. Repeatedly does a grace period.
  301. */
  302. static int
  303. rcu_perf_writer(void *arg)
  304. {
  305. int i = 0;
  306. int i_max;
  307. long me = (long)arg;
  308. struct sched_param sp;
  309. bool started = false, done = false, alldone = false;
  310. u64 t;
  311. u64 *wdp;
  312. u64 *wdpp = writer_durations[me];
  313. VERBOSE_PERFOUT_STRING("rcu_perf_writer task started");
  314. WARN_ON(rcu_gp_is_expedited() && !rcu_gp_is_normal() && !gp_exp);
  315. WARN_ON(rcu_gp_is_normal() && gp_exp);
  316. WARN_ON(!wdpp);
  317. set_cpus_allowed_ptr(current, cpumask_of(me % nr_cpu_ids));
  318. sp.sched_priority = 1;
  319. sched_setscheduler_nocheck(current, SCHED_FIFO, &sp);
  320. t = ktime_get_mono_fast_ns();
  321. if (atomic_inc_return(&n_rcu_perf_writer_started) >= nrealwriters) {
  322. t_rcu_perf_writer_started = t;
  323. if (gp_exp) {
  324. b_rcu_perf_writer_started =
  325. cur_ops->exp_completed() / 2;
  326. } else {
  327. b_rcu_perf_writer_started =
  328. cur_ops->completed();
  329. }
  330. }
  331. do {
  332. wdp = &wdpp[i];
  333. *wdp = ktime_get_mono_fast_ns();
  334. if (gp_exp) {
  335. rcu_perf_writer_state = RTWS_EXP_SYNC;
  336. cur_ops->exp_sync();
  337. } else {
  338. rcu_perf_writer_state = RTWS_SYNC;
  339. cur_ops->sync();
  340. }
  341. rcu_perf_writer_state = RTWS_IDLE;
  342. t = ktime_get_mono_fast_ns();
  343. *wdp = t - *wdp;
  344. i_max = i;
  345. if (!started &&
  346. atomic_read(&n_rcu_perf_writer_started) >= nrealwriters)
  347. started = true;
  348. if (!done && i >= MIN_MEAS) {
  349. done = true;
  350. pr_alert("%s" PERF_FLAG
  351. "rcu_perf_writer %ld has %d measurements\n",
  352. perf_type, me, MIN_MEAS);
  353. if (atomic_inc_return(&n_rcu_perf_writer_finished) >=
  354. nrealwriters) {
  355. PERFOUT_STRING("Test complete");
  356. t_rcu_perf_writer_finished = t;
  357. if (gp_exp) {
  358. b_rcu_perf_writer_finished =
  359. cur_ops->exp_completed() / 2;
  360. } else {
  361. b_rcu_perf_writer_finished =
  362. cur_ops->completed();
  363. }
  364. smp_mb(); /* Assign before wake. */
  365. wake_up(&shutdown_wq);
  366. }
  367. }
  368. if (done && !alldone &&
  369. atomic_read(&n_rcu_perf_writer_finished) >= nrealwriters)
  370. alldone = true;
  371. if (started && !alldone && i < MAX_MEAS - 1)
  372. i++;
  373. rcu_perf_wait_shutdown();
  374. } while (!torture_must_stop());
  375. rcu_perf_writer_state = RTWS_STOPPING;
  376. writer_n_durations[me] = i_max;
  377. torture_kthread_stopping("rcu_perf_writer");
  378. return 0;
  379. }
  380. static inline void
  381. rcu_perf_print_module_parms(struct rcu_perf_ops *cur_ops, const char *tag)
  382. {
  383. pr_alert("%s" PERF_FLAG
  384. "--- %s: nreaders=%d nwriters=%d verbose=%d shutdown=%d\n",
  385. perf_type, tag, nrealreaders, nrealwriters, verbose, shutdown);
  386. }
  387. static void
  388. rcu_perf_cleanup(void)
  389. {
  390. int i;
  391. int j;
  392. int ngps = 0;
  393. u64 *wdp;
  394. u64 *wdpp;
  395. if (torture_cleanup_begin())
  396. return;
  397. if (reader_tasks) {
  398. for (i = 0; i < nrealreaders; i++)
  399. torture_stop_kthread(rcu_perf_reader,
  400. reader_tasks[i]);
  401. kfree(reader_tasks);
  402. }
  403. if (writer_tasks) {
  404. for (i = 0; i < nrealwriters; i++) {
  405. torture_stop_kthread(rcu_perf_writer,
  406. writer_tasks[i]);
  407. if (!writer_n_durations)
  408. continue;
  409. j = writer_n_durations[i];
  410. pr_alert("%s%s writer %d gps: %d\n",
  411. perf_type, PERF_FLAG, i, j);
  412. ngps += j;
  413. }
  414. pr_alert("%s%s start: %llu end: %llu duration: %llu gps: %d batches: %ld\n",
  415. perf_type, PERF_FLAG,
  416. t_rcu_perf_writer_started, t_rcu_perf_writer_finished,
  417. t_rcu_perf_writer_finished -
  418. t_rcu_perf_writer_started,
  419. ngps,
  420. b_rcu_perf_writer_finished -
  421. b_rcu_perf_writer_started);
  422. for (i = 0; i < nrealwriters; i++) {
  423. if (!writer_durations)
  424. break;
  425. if (!writer_n_durations)
  426. continue;
  427. wdpp = writer_durations[i];
  428. if (!wdpp)
  429. continue;
  430. for (j = 0; j <= writer_n_durations[i]; j++) {
  431. wdp = &wdpp[j];
  432. pr_alert("%s%s %4d writer-duration: %5d %llu\n",
  433. perf_type, PERF_FLAG,
  434. i, j, *wdp);
  435. if (j % 100 == 0)
  436. schedule_timeout_uninterruptible(1);
  437. }
  438. kfree(writer_durations[i]);
  439. }
  440. kfree(writer_tasks);
  441. kfree(writer_durations);
  442. kfree(writer_n_durations);
  443. }
  444. /* Do flavor-specific cleanup operations. */
  445. if (cur_ops->cleanup != NULL)
  446. cur_ops->cleanup();
  447. torture_cleanup_end();
  448. }
  449. /*
  450. * Return the number if non-negative. If -1, the number of CPUs.
  451. * If less than -1, that much less than the number of CPUs, but
  452. * at least one.
  453. */
  454. static int compute_real(int n)
  455. {
  456. int nr;
  457. if (n >= 0) {
  458. nr = n;
  459. } else {
  460. nr = num_online_cpus() + 1 + n;
  461. if (nr <= 0)
  462. nr = 1;
  463. }
  464. return nr;
  465. }
  466. /*
  467. * RCU perf shutdown kthread. Just waits to be awakened, then shuts
  468. * down system.
  469. */
  470. static int
  471. rcu_perf_shutdown(void *arg)
  472. {
  473. do {
  474. wait_event(shutdown_wq,
  475. atomic_read(&n_rcu_perf_writer_finished) >=
  476. nrealwriters);
  477. } while (atomic_read(&n_rcu_perf_writer_finished) < nrealwriters);
  478. smp_mb(); /* Wake before output. */
  479. rcu_perf_cleanup();
  480. kernel_power_off();
  481. return -EINVAL;
  482. }
  483. static int __init
  484. rcu_perf_init(void)
  485. {
  486. long i;
  487. int firsterr = 0;
  488. static struct rcu_perf_ops *perf_ops[] = {
  489. &rcu_ops, &rcu_bh_ops, &srcu_ops, &sched_ops,
  490. RCUPERF_TASKS_OPS
  491. };
  492. if (!torture_init_begin(perf_type, verbose, &perf_runnable))
  493. return -EBUSY;
  494. /* Process args and tell the world that the perf'er is on the job. */
  495. for (i = 0; i < ARRAY_SIZE(perf_ops); i++) {
  496. cur_ops = perf_ops[i];
  497. if (strcmp(perf_type, cur_ops->name) == 0)
  498. break;
  499. }
  500. if (i == ARRAY_SIZE(perf_ops)) {
  501. pr_alert("rcu-perf: invalid perf type: \"%s\"\n",
  502. perf_type);
  503. pr_alert("rcu-perf types:");
  504. for (i = 0; i < ARRAY_SIZE(perf_ops); i++)
  505. pr_alert(" %s", perf_ops[i]->name);
  506. pr_alert("\n");
  507. firsterr = -EINVAL;
  508. goto unwind;
  509. }
  510. if (cur_ops->init)
  511. cur_ops->init();
  512. nrealwriters = compute_real(nwriters);
  513. nrealreaders = compute_real(nreaders);
  514. atomic_set(&n_rcu_perf_reader_started, 0);
  515. atomic_set(&n_rcu_perf_writer_started, 0);
  516. atomic_set(&n_rcu_perf_writer_finished, 0);
  517. rcu_perf_print_module_parms(cur_ops, "Start of test");
  518. /* Start up the kthreads. */
  519. if (shutdown) {
  520. init_waitqueue_head(&shutdown_wq);
  521. firsterr = torture_create_kthread(rcu_perf_shutdown, NULL,
  522. shutdown_task);
  523. if (firsterr)
  524. goto unwind;
  525. schedule_timeout_uninterruptible(1);
  526. }
  527. reader_tasks = kcalloc(nrealreaders, sizeof(reader_tasks[0]),
  528. GFP_KERNEL);
  529. if (reader_tasks == NULL) {
  530. VERBOSE_PERFOUT_ERRSTRING("out of memory");
  531. firsterr = -ENOMEM;
  532. goto unwind;
  533. }
  534. for (i = 0; i < nrealreaders; i++) {
  535. firsterr = torture_create_kthread(rcu_perf_reader, (void *)i,
  536. reader_tasks[i]);
  537. if (firsterr)
  538. goto unwind;
  539. }
  540. while (atomic_read(&n_rcu_perf_reader_started) < nrealreaders)
  541. schedule_timeout_uninterruptible(1);
  542. writer_tasks = kcalloc(nrealwriters, sizeof(reader_tasks[0]),
  543. GFP_KERNEL);
  544. writer_durations = kcalloc(nrealwriters, sizeof(*writer_durations),
  545. GFP_KERNEL);
  546. writer_n_durations =
  547. kcalloc(nrealwriters, sizeof(*writer_n_durations),
  548. GFP_KERNEL);
  549. if (!writer_tasks || !writer_durations || !writer_n_durations) {
  550. VERBOSE_PERFOUT_ERRSTRING("out of memory");
  551. firsterr = -ENOMEM;
  552. goto unwind;
  553. }
  554. for (i = 0; i < nrealwriters; i++) {
  555. writer_durations[i] =
  556. kcalloc(MAX_MEAS, sizeof(*writer_durations[i]),
  557. GFP_KERNEL);
  558. if (!writer_durations[i])
  559. goto unwind;
  560. firsterr = torture_create_kthread(rcu_perf_writer, (void *)i,
  561. writer_tasks[i]);
  562. if (firsterr)
  563. goto unwind;
  564. }
  565. torture_init_end();
  566. return 0;
  567. unwind:
  568. torture_init_end();
  569. rcu_perf_cleanup();
  570. return firsterr;
  571. }
  572. module_init(rcu_perf_init);
  573. module_exit(rcu_perf_cleanup);