rcupdate.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614
  1. /*
  2. * Read-Copy Update mechanism for mutual exclusion
  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, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17. *
  18. * Copyright (C) IBM Corporation, 2001
  19. *
  20. * Authors: Dipankar Sarma <dipankar@in.ibm.com>
  21. * Manfred Spraul <manfred@colorfullife.com>
  22. *
  23. * Based on the original work by Paul McKenney <paulmck@us.ibm.com>
  24. * and inputs from Rusty Russell, Andrea Arcangeli and Andi Kleen.
  25. * Papers:
  26. * http://www.rdrop.com/users/paulmck/paper/rclockpdcsproof.pdf
  27. * http://lse.sourceforge.net/locking/rclock_OLS.2001.05.01c.sc.pdf (OLS2001)
  28. *
  29. * For detailed explanation of Read-Copy Update mechanism see -
  30. * http://lse.sourceforge.net/locking/rcupdate.html
  31. *
  32. */
  33. #include <linux/types.h>
  34. #include <linux/kernel.h>
  35. #include <linux/init.h>
  36. #include <linux/spinlock.h>
  37. #include <linux/smp.h>
  38. #include <linux/rcupdate.h>
  39. #include <linux/interrupt.h>
  40. #include <linux/sched.h>
  41. #include <asm/atomic.h>
  42. #include <linux/bitops.h>
  43. #include <linux/module.h>
  44. #include <linux/completion.h>
  45. #include <linux/moduleparam.h>
  46. #include <linux/percpu.h>
  47. #include <linux/notifier.h>
  48. #include <linux/rcupdate.h>
  49. #include <linux/cpu.h>
  50. #include <linux/mutex.h>
  51. /* Definition for rcupdate control block. */
  52. static struct rcu_ctrlblk rcu_ctrlblk = {
  53. .cur = -300,
  54. .completed = -300,
  55. .lock = SPIN_LOCK_UNLOCKED,
  56. .cpumask = CPU_MASK_NONE,
  57. };
  58. static struct rcu_ctrlblk rcu_bh_ctrlblk = {
  59. .cur = -300,
  60. .completed = -300,
  61. .lock = SPIN_LOCK_UNLOCKED,
  62. .cpumask = CPU_MASK_NONE,
  63. };
  64. DEFINE_PER_CPU(struct rcu_data, rcu_data) = { 0L };
  65. DEFINE_PER_CPU(struct rcu_data, rcu_bh_data) = { 0L };
  66. /* Fake initialization required by compiler */
  67. static DEFINE_PER_CPU(struct tasklet_struct, rcu_tasklet) = {NULL};
  68. static int blimit = 10;
  69. static int qhimark = 10000;
  70. static int qlowmark = 100;
  71. #ifdef CONFIG_SMP
  72. static int rsinterval = 1000;
  73. #endif
  74. static atomic_t rcu_barrier_cpu_count;
  75. static DEFINE_MUTEX(rcu_barrier_mutex);
  76. static struct completion rcu_barrier_completion;
  77. #ifdef CONFIG_SMP
  78. static void force_quiescent_state(struct rcu_data *rdp,
  79. struct rcu_ctrlblk *rcp)
  80. {
  81. int cpu;
  82. cpumask_t cpumask;
  83. set_need_resched();
  84. if (unlikely(rdp->qlen - rdp->last_rs_qlen > rsinterval)) {
  85. rdp->last_rs_qlen = rdp->qlen;
  86. /*
  87. * Don't send IPI to itself. With irqs disabled,
  88. * rdp->cpu is the current cpu.
  89. */
  90. cpumask = rcp->cpumask;
  91. cpu_clear(rdp->cpu, cpumask);
  92. for_each_cpu_mask(cpu, cpumask)
  93. smp_send_reschedule(cpu);
  94. }
  95. }
  96. #else
  97. static inline void force_quiescent_state(struct rcu_data *rdp,
  98. struct rcu_ctrlblk *rcp)
  99. {
  100. set_need_resched();
  101. }
  102. #endif
  103. /**
  104. * call_rcu - Queue an RCU callback for invocation after a grace period.
  105. * @head: structure to be used for queueing the RCU updates.
  106. * @func: actual update function to be invoked after the grace period
  107. *
  108. * The update function will be invoked some time after a full grace
  109. * period elapses, in other words after all currently executing RCU
  110. * read-side critical sections have completed. RCU read-side critical
  111. * sections are delimited by rcu_read_lock() and rcu_read_unlock(),
  112. * and may be nested.
  113. */
  114. void fastcall call_rcu(struct rcu_head *head,
  115. void (*func)(struct rcu_head *rcu))
  116. {
  117. unsigned long flags;
  118. struct rcu_data *rdp;
  119. head->func = func;
  120. head->next = NULL;
  121. local_irq_save(flags);
  122. rdp = &__get_cpu_var(rcu_data);
  123. *rdp->nxttail = head;
  124. rdp->nxttail = &head->next;
  125. if (unlikely(++rdp->qlen > qhimark)) {
  126. rdp->blimit = INT_MAX;
  127. force_quiescent_state(rdp, &rcu_ctrlblk);
  128. }
  129. local_irq_restore(flags);
  130. }
  131. /**
  132. * call_rcu_bh - Queue an RCU for invocation after a quicker grace period.
  133. * @head: structure to be used for queueing the RCU updates.
  134. * @func: actual update function to be invoked after the grace period
  135. *
  136. * The update function will be invoked some time after a full grace
  137. * period elapses, in other words after all currently executing RCU
  138. * read-side critical sections have completed. call_rcu_bh() assumes
  139. * that the read-side critical sections end on completion of a softirq
  140. * handler. This means that read-side critical sections in process
  141. * context must not be interrupted by softirqs. This interface is to be
  142. * used when most of the read-side critical sections are in softirq context.
  143. * RCU read-side critical sections are delimited by rcu_read_lock() and
  144. * rcu_read_unlock(), * if in interrupt context or rcu_read_lock_bh()
  145. * and rcu_read_unlock_bh(), if in process context. These may be nested.
  146. */
  147. void fastcall call_rcu_bh(struct rcu_head *head,
  148. void (*func)(struct rcu_head *rcu))
  149. {
  150. unsigned long flags;
  151. struct rcu_data *rdp;
  152. head->func = func;
  153. head->next = NULL;
  154. local_irq_save(flags);
  155. rdp = &__get_cpu_var(rcu_bh_data);
  156. *rdp->nxttail = head;
  157. rdp->nxttail = &head->next;
  158. if (unlikely(++rdp->qlen > qhimark)) {
  159. rdp->blimit = INT_MAX;
  160. force_quiescent_state(rdp, &rcu_bh_ctrlblk);
  161. }
  162. local_irq_restore(flags);
  163. }
  164. /*
  165. * Return the number of RCU batches processed thus far. Useful
  166. * for debug and statistics.
  167. */
  168. long rcu_batches_completed(void)
  169. {
  170. return rcu_ctrlblk.completed;
  171. }
  172. static void rcu_barrier_callback(struct rcu_head *notused)
  173. {
  174. if (atomic_dec_and_test(&rcu_barrier_cpu_count))
  175. complete(&rcu_barrier_completion);
  176. }
  177. /*
  178. * Called with preemption disabled, and from cross-cpu IRQ context.
  179. */
  180. static void rcu_barrier_func(void *notused)
  181. {
  182. int cpu = smp_processor_id();
  183. struct rcu_data *rdp = &per_cpu(rcu_data, cpu);
  184. struct rcu_head *head;
  185. head = &rdp->barrier;
  186. atomic_inc(&rcu_barrier_cpu_count);
  187. call_rcu(head, rcu_barrier_callback);
  188. }
  189. /**
  190. * rcu_barrier - Wait until all the in-flight RCUs are complete.
  191. */
  192. void rcu_barrier(void)
  193. {
  194. BUG_ON(in_interrupt());
  195. /* Take cpucontrol mutex to protect against CPU hotplug */
  196. mutex_lock(&rcu_barrier_mutex);
  197. init_completion(&rcu_barrier_completion);
  198. atomic_set(&rcu_barrier_cpu_count, 0);
  199. on_each_cpu(rcu_barrier_func, NULL, 0, 1);
  200. wait_for_completion(&rcu_barrier_completion);
  201. mutex_unlock(&rcu_barrier_mutex);
  202. }
  203. EXPORT_SYMBOL_GPL(rcu_barrier);
  204. /*
  205. * Invoke the completed RCU callbacks. They are expected to be in
  206. * a per-cpu list.
  207. */
  208. static void rcu_do_batch(struct rcu_data *rdp)
  209. {
  210. struct rcu_head *next, *list;
  211. int count = 0;
  212. list = rdp->donelist;
  213. while (list) {
  214. next = rdp->donelist = list->next;
  215. list->func(list);
  216. list = next;
  217. rdp->qlen--;
  218. if (++count >= rdp->blimit)
  219. break;
  220. }
  221. if (rdp->blimit == INT_MAX && rdp->qlen <= qlowmark)
  222. rdp->blimit = blimit;
  223. if (!rdp->donelist)
  224. rdp->donetail = &rdp->donelist;
  225. else
  226. tasklet_schedule(&per_cpu(rcu_tasklet, rdp->cpu));
  227. }
  228. /*
  229. * Grace period handling:
  230. * The grace period handling consists out of two steps:
  231. * - A new grace period is started.
  232. * This is done by rcu_start_batch. The start is not broadcasted to
  233. * all cpus, they must pick this up by comparing rcp->cur with
  234. * rdp->quiescbatch. All cpus are recorded in the
  235. * rcu_ctrlblk.cpumask bitmap.
  236. * - All cpus must go through a quiescent state.
  237. * Since the start of the grace period is not broadcasted, at least two
  238. * calls to rcu_check_quiescent_state are required:
  239. * The first call just notices that a new grace period is running. The
  240. * following calls check if there was a quiescent state since the beginning
  241. * of the grace period. If so, it updates rcu_ctrlblk.cpumask. If
  242. * the bitmap is empty, then the grace period is completed.
  243. * rcu_check_quiescent_state calls rcu_start_batch(0) to start the next grace
  244. * period (if necessary).
  245. */
  246. /*
  247. * Register a new batch of callbacks, and start it up if there is currently no
  248. * active batch and the batch to be registered has not already occurred.
  249. * Caller must hold rcu_ctrlblk.lock.
  250. */
  251. static void rcu_start_batch(struct rcu_ctrlblk *rcp)
  252. {
  253. if (rcp->next_pending &&
  254. rcp->completed == rcp->cur) {
  255. rcp->next_pending = 0;
  256. /*
  257. * next_pending == 0 must be visible in
  258. * __rcu_process_callbacks() before it can see new value of cur.
  259. */
  260. smp_wmb();
  261. rcp->cur++;
  262. /*
  263. * Accessing nohz_cpu_mask before incrementing rcp->cur needs a
  264. * Barrier Otherwise it can cause tickless idle CPUs to be
  265. * included in rcp->cpumask, which will extend graceperiods
  266. * unnecessarily.
  267. */
  268. smp_mb();
  269. cpus_andnot(rcp->cpumask, cpu_online_map, nohz_cpu_mask);
  270. }
  271. }
  272. /*
  273. * cpu went through a quiescent state since the beginning of the grace period.
  274. * Clear it from the cpu mask and complete the grace period if it was the last
  275. * cpu. Start another grace period if someone has further entries pending
  276. */
  277. static void cpu_quiet(int cpu, struct rcu_ctrlblk *rcp)
  278. {
  279. cpu_clear(cpu, rcp->cpumask);
  280. if (cpus_empty(rcp->cpumask)) {
  281. /* batch completed ! */
  282. rcp->completed = rcp->cur;
  283. rcu_start_batch(rcp);
  284. }
  285. }
  286. /*
  287. * Check if the cpu has gone through a quiescent state (say context
  288. * switch). If so and if it already hasn't done so in this RCU
  289. * quiescent cycle, then indicate that it has done so.
  290. */
  291. static void rcu_check_quiescent_state(struct rcu_ctrlblk *rcp,
  292. struct rcu_data *rdp)
  293. {
  294. if (rdp->quiescbatch != rcp->cur) {
  295. /* start new grace period: */
  296. rdp->qs_pending = 1;
  297. rdp->passed_quiesc = 0;
  298. rdp->quiescbatch = rcp->cur;
  299. return;
  300. }
  301. /* Grace period already completed for this cpu?
  302. * qs_pending is checked instead of the actual bitmap to avoid
  303. * cacheline trashing.
  304. */
  305. if (!rdp->qs_pending)
  306. return;
  307. /*
  308. * Was there a quiescent state since the beginning of the grace
  309. * period? If no, then exit and wait for the next call.
  310. */
  311. if (!rdp->passed_quiesc)
  312. return;
  313. rdp->qs_pending = 0;
  314. spin_lock(&rcp->lock);
  315. /*
  316. * rdp->quiescbatch/rcp->cur and the cpu bitmap can come out of sync
  317. * during cpu startup. Ignore the quiescent state.
  318. */
  319. if (likely(rdp->quiescbatch == rcp->cur))
  320. cpu_quiet(rdp->cpu, rcp);
  321. spin_unlock(&rcp->lock);
  322. }
  323. #ifdef CONFIG_HOTPLUG_CPU
  324. /* warning! helper for rcu_offline_cpu. do not use elsewhere without reviewing
  325. * locking requirements, the list it's pulling from has to belong to a cpu
  326. * which is dead and hence not processing interrupts.
  327. */
  328. static void rcu_move_batch(struct rcu_data *this_rdp, struct rcu_head *list,
  329. struct rcu_head **tail)
  330. {
  331. local_irq_disable();
  332. *this_rdp->nxttail = list;
  333. if (list)
  334. this_rdp->nxttail = tail;
  335. local_irq_enable();
  336. }
  337. static void __rcu_offline_cpu(struct rcu_data *this_rdp,
  338. struct rcu_ctrlblk *rcp, struct rcu_data *rdp)
  339. {
  340. /* if the cpu going offline owns the grace period
  341. * we can block indefinitely waiting for it, so flush
  342. * it here
  343. */
  344. spin_lock_bh(&rcp->lock);
  345. if (rcp->cur != rcp->completed)
  346. cpu_quiet(rdp->cpu, rcp);
  347. spin_unlock_bh(&rcp->lock);
  348. rcu_move_batch(this_rdp, rdp->curlist, rdp->curtail);
  349. rcu_move_batch(this_rdp, rdp->nxtlist, rdp->nxttail);
  350. rcu_move_batch(this_rdp, rdp->donelist, rdp->donetail);
  351. }
  352. static void rcu_offline_cpu(int cpu)
  353. {
  354. struct rcu_data *this_rdp = &get_cpu_var(rcu_data);
  355. struct rcu_data *this_bh_rdp = &get_cpu_var(rcu_bh_data);
  356. __rcu_offline_cpu(this_rdp, &rcu_ctrlblk,
  357. &per_cpu(rcu_data, cpu));
  358. __rcu_offline_cpu(this_bh_rdp, &rcu_bh_ctrlblk,
  359. &per_cpu(rcu_bh_data, cpu));
  360. put_cpu_var(rcu_data);
  361. put_cpu_var(rcu_bh_data);
  362. tasklet_kill_immediate(&per_cpu(rcu_tasklet, cpu), cpu);
  363. }
  364. #else
  365. static void rcu_offline_cpu(int cpu)
  366. {
  367. }
  368. #endif
  369. /*
  370. * This does the RCU processing work from tasklet context.
  371. */
  372. static void __rcu_process_callbacks(struct rcu_ctrlblk *rcp,
  373. struct rcu_data *rdp)
  374. {
  375. if (rdp->curlist && !rcu_batch_before(rcp->completed, rdp->batch)) {
  376. *rdp->donetail = rdp->curlist;
  377. rdp->donetail = rdp->curtail;
  378. rdp->curlist = NULL;
  379. rdp->curtail = &rdp->curlist;
  380. }
  381. if (rdp->nxtlist && !rdp->curlist) {
  382. local_irq_disable();
  383. rdp->curlist = rdp->nxtlist;
  384. rdp->curtail = rdp->nxttail;
  385. rdp->nxtlist = NULL;
  386. rdp->nxttail = &rdp->nxtlist;
  387. local_irq_enable();
  388. /*
  389. * start the next batch of callbacks
  390. */
  391. /* determine batch number */
  392. rdp->batch = rcp->cur + 1;
  393. /* see the comment and corresponding wmb() in
  394. * the rcu_start_batch()
  395. */
  396. smp_rmb();
  397. if (!rcp->next_pending) {
  398. /* and start it/schedule start if it's a new batch */
  399. spin_lock(&rcp->lock);
  400. rcp->next_pending = 1;
  401. rcu_start_batch(rcp);
  402. spin_unlock(&rcp->lock);
  403. }
  404. }
  405. rcu_check_quiescent_state(rcp, rdp);
  406. if (rdp->donelist)
  407. rcu_do_batch(rdp);
  408. }
  409. static void rcu_process_callbacks(unsigned long unused)
  410. {
  411. __rcu_process_callbacks(&rcu_ctrlblk, &__get_cpu_var(rcu_data));
  412. __rcu_process_callbacks(&rcu_bh_ctrlblk, &__get_cpu_var(rcu_bh_data));
  413. }
  414. static int __rcu_pending(struct rcu_ctrlblk *rcp, struct rcu_data *rdp)
  415. {
  416. /* This cpu has pending rcu entries and the grace period
  417. * for them has completed.
  418. */
  419. if (rdp->curlist && !rcu_batch_before(rcp->completed, rdp->batch))
  420. return 1;
  421. /* This cpu has no pending entries, but there are new entries */
  422. if (!rdp->curlist && rdp->nxtlist)
  423. return 1;
  424. /* This cpu has finished callbacks to invoke */
  425. if (rdp->donelist)
  426. return 1;
  427. /* The rcu core waits for a quiescent state from the cpu */
  428. if (rdp->quiescbatch != rcp->cur || rdp->qs_pending)
  429. return 1;
  430. /* nothing to do */
  431. return 0;
  432. }
  433. int rcu_pending(int cpu)
  434. {
  435. return __rcu_pending(&rcu_ctrlblk, &per_cpu(rcu_data, cpu)) ||
  436. __rcu_pending(&rcu_bh_ctrlblk, &per_cpu(rcu_bh_data, cpu));
  437. }
  438. void rcu_check_callbacks(int cpu, int user)
  439. {
  440. if (user ||
  441. (idle_cpu(cpu) && !in_softirq() &&
  442. hardirq_count() <= (1 << HARDIRQ_SHIFT))) {
  443. rcu_qsctr_inc(cpu);
  444. rcu_bh_qsctr_inc(cpu);
  445. } else if (!in_softirq())
  446. rcu_bh_qsctr_inc(cpu);
  447. tasklet_schedule(&per_cpu(rcu_tasklet, cpu));
  448. }
  449. static void rcu_init_percpu_data(int cpu, struct rcu_ctrlblk *rcp,
  450. struct rcu_data *rdp)
  451. {
  452. memset(rdp, 0, sizeof(*rdp));
  453. rdp->curtail = &rdp->curlist;
  454. rdp->nxttail = &rdp->nxtlist;
  455. rdp->donetail = &rdp->donelist;
  456. rdp->quiescbatch = rcp->completed;
  457. rdp->qs_pending = 0;
  458. rdp->cpu = cpu;
  459. rdp->blimit = blimit;
  460. }
  461. static void __devinit rcu_online_cpu(int cpu)
  462. {
  463. struct rcu_data *rdp = &per_cpu(rcu_data, cpu);
  464. struct rcu_data *bh_rdp = &per_cpu(rcu_bh_data, cpu);
  465. rcu_init_percpu_data(cpu, &rcu_ctrlblk, rdp);
  466. rcu_init_percpu_data(cpu, &rcu_bh_ctrlblk, bh_rdp);
  467. tasklet_init(&per_cpu(rcu_tasklet, cpu), rcu_process_callbacks, 0UL);
  468. }
  469. static int __devinit rcu_cpu_notify(struct notifier_block *self,
  470. unsigned long action, void *hcpu)
  471. {
  472. long cpu = (long)hcpu;
  473. switch (action) {
  474. case CPU_UP_PREPARE:
  475. rcu_online_cpu(cpu);
  476. break;
  477. case CPU_DEAD:
  478. rcu_offline_cpu(cpu);
  479. break;
  480. default:
  481. break;
  482. }
  483. return NOTIFY_OK;
  484. }
  485. static struct notifier_block rcu_nb = {
  486. .notifier_call = rcu_cpu_notify,
  487. };
  488. /*
  489. * Initializes rcu mechanism. Assumed to be called early.
  490. * That is before local timer(SMP) or jiffie timer (uniproc) is setup.
  491. * Note that rcu_qsctr and friends are implicitly
  492. * initialized due to the choice of ``0'' for RCU_CTR_INVALID.
  493. */
  494. void __init rcu_init(void)
  495. {
  496. rcu_cpu_notify(&rcu_nb, CPU_UP_PREPARE,
  497. (void *)(long)smp_processor_id());
  498. /* Register notifier for non-boot CPUs */
  499. register_cpu_notifier(&rcu_nb);
  500. }
  501. struct rcu_synchronize {
  502. struct rcu_head head;
  503. struct completion completion;
  504. };
  505. /* Because of FASTCALL declaration of complete, we use this wrapper */
  506. static void wakeme_after_rcu(struct rcu_head *head)
  507. {
  508. struct rcu_synchronize *rcu;
  509. rcu = container_of(head, struct rcu_synchronize, head);
  510. complete(&rcu->completion);
  511. }
  512. /**
  513. * synchronize_rcu - wait until a grace period has elapsed.
  514. *
  515. * Control will return to the caller some time after a full grace
  516. * period has elapsed, in other words after all currently executing RCU
  517. * read-side critical sections have completed. RCU read-side critical
  518. * sections are delimited by rcu_read_lock() and rcu_read_unlock(),
  519. * and may be nested.
  520. *
  521. * If your read-side code is not protected by rcu_read_lock(), do -not-
  522. * use synchronize_rcu().
  523. */
  524. void synchronize_rcu(void)
  525. {
  526. struct rcu_synchronize rcu;
  527. init_completion(&rcu.completion);
  528. /* Will wake me after RCU finished */
  529. call_rcu(&rcu.head, wakeme_after_rcu);
  530. /* Wait for it */
  531. wait_for_completion(&rcu.completion);
  532. }
  533. /*
  534. * Deprecated, use synchronize_rcu() or synchronize_sched() instead.
  535. */
  536. void synchronize_kernel(void)
  537. {
  538. synchronize_rcu();
  539. }
  540. module_param(blimit, int, 0);
  541. module_param(qhimark, int, 0);
  542. module_param(qlowmark, int, 0);
  543. #ifdef CONFIG_SMP
  544. module_param(rsinterval, int, 0);
  545. #endif
  546. EXPORT_SYMBOL_GPL(rcu_batches_completed);
  547. EXPORT_SYMBOL_GPL_FUTURE(call_rcu); /* WARNING: GPL-only in April 2006. */
  548. EXPORT_SYMBOL_GPL_FUTURE(call_rcu_bh); /* WARNING: GPL-only in April 2006. */
  549. EXPORT_SYMBOL_GPL(synchronize_rcu);
  550. EXPORT_SYMBOL_GPL_FUTURE(synchronize_kernel); /* WARNING: GPL-only in April 2006. */