Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
rcutree.h File Reference
#include <linux/cache.h>
#include <linux/spinlock.h>
#include <linux/threads.h>
#include <linux/cpumask.h>
#include <linux/seqlock.h>

Go to the source code of this file.

Data Structures

struct  rcu_dynticks
 
struct  rcu_node
 
struct  rcu_data
 
struct  rcu_state
 

Macros

#define MAX_RCU_LVLS   4
 
#define RCU_FANOUT_1   (CONFIG_RCU_FANOUT_LEAF)
 
#define RCU_FANOUT_2   (RCU_FANOUT_1 * CONFIG_RCU_FANOUT)
 
#define RCU_FANOUT_3   (RCU_FANOUT_2 * CONFIG_RCU_FANOUT)
 
#define RCU_FANOUT_4   (RCU_FANOUT_3 * CONFIG_RCU_FANOUT)
 
#define RCU_NUM_LVLS   1
 
#define NUM_RCU_LVL_0   1
 
#define NUM_RCU_LVL_1   (NR_CPUS)
 
#define NUM_RCU_LVL_2   0
 
#define NUM_RCU_LVL_3   0
 
#define NUM_RCU_LVL_4   0
 
#define RCU_SUM   (NUM_RCU_LVL_0 + NUM_RCU_LVL_1 + NUM_RCU_LVL_2 + NUM_RCU_LVL_3 + NUM_RCU_LVL_4)
 
#define NUM_RCU_NODES   (RCU_SUM - NR_CPUS)
 
#define RCU_KTHREAD_STOPPED   0
 
#define RCU_KTHREAD_RUNNING   1
 
#define RCU_KTHREAD_WAITING   2
 
#define RCU_KTHREAD_OFFCPU   3
 
#define RCU_KTHREAD_YIELDING   4
 
#define RCU_KTHREAD_MAX   4
 
#define rcu_for_each_node_breadth_first(rsp, rnp)
 
#define rcu_for_each_nonleaf_node_breadth_first(rsp, rnp)
 
#define rcu_for_each_leaf_node(rsp, rnp)
 
#define RCU_DONE_TAIL   0 /* Also RCU_WAIT head. */
 
#define RCU_WAIT_TAIL   1 /* Also RCU_NEXT_READY head. */
 
#define RCU_NEXT_READY_TAIL   2 /* Also RCU_NEXT head. */
 
#define RCU_NEXT_TAIL   3
 
#define RCU_NEXT_SIZE   4
 
#define RCU_GP_IDLE   0 /* No grace period in progress. */
 
#define RCU_GP_INIT   1 /* Grace period being initialized. */
 
#define RCU_SAVE_DYNTICK   2 /* Need to scan dyntick state. */
 
#define RCU_FORCE_QS   3 /* Need to force quiescent state. */
 
#define RCU_SIGNAL_INIT   RCU_SAVE_DYNTICK
 
#define RCU_JIFFIES_TILL_FORCE_QS   3 /* for rsp->jiffies_force_qs */
 
#define RCU_STALL_DELAY_DELTA   0
 
#define RCU_STALL_RAT_DELAY   2 /* Allow other CPUs time */
 
#define rcu_wait(cond)
 
#define RCU_GP_FLAG_INIT   0x1 /* Need grace-period initialization. */
 
#define RCU_GP_FLAG_FQS   0x2 /* Need grace-period quiescent-state forcing. */
 
#define for_each_rcu_flavor(rsp)   list_for_each_entry((rsp), &rcu_struct_flavors, flavors)
 
#define RCU_OFL_TASKS_NORM_GP   0x1 /* Tasks blocking normal */
 
#define RCU_OFL_TASKS_EXP_GP   0x2 /* Tasks blocking expedited */
 

Functions

 DECLARE_PER_CPU (struct rcu_data, rcu_sched_data)
 
 DECLARE_PER_CPU (struct rcu_data, rcu_bh_data)
 
long rcu_batches_completed (void)
 
void call_rcu (struct rcu_head *head, void(*func)(struct rcu_head *rcu))
 

Variables

int rcu_num_lvls
 
int rcu_num_nodes
 
struct rcu_node ____cacheline_internodealigned_in_smp
 
struct list_head rcu_struct_flavors
 
struct rcu_state rcu_sched_state
 
struct rcu_state rcu_bh_state
 

Macro Definition Documentation

#define for_each_rcu_flavor (   rsp)    list_for_each_entry((rsp), &rcu_struct_flavors, flavors)

Definition at line 431 of file rcutree.h.

#define MAX_RCU_LVLS   4

Definition at line 38 of file rcutree.h.

#define NUM_RCU_LVL_0   1

Definition at line 46 of file rcutree.h.

#define NUM_RCU_LVL_1   (NR_CPUS)

Definition at line 47 of file rcutree.h.

#define NUM_RCU_LVL_2   0

Definition at line 48 of file rcutree.h.

#define NUM_RCU_LVL_3   0

Definition at line 49 of file rcutree.h.

#define NUM_RCU_LVL_4   0

Definition at line 50 of file rcutree.h.

#define NUM_RCU_NODES   (RCU_SUM - NR_CPUS)

Definition at line 77 of file rcutree.h.

#define RCU_DONE_TAIL   0 /* Also RCU_WAIT head. */

Definition at line 234 of file rcutree.h.

#define RCU_FANOUT_1   (CONFIG_RCU_FANOUT_LEAF)

Definition at line 39 of file rcutree.h.

#define RCU_FANOUT_2   (RCU_FANOUT_1 * CONFIG_RCU_FANOUT)

Definition at line 40 of file rcutree.h.

#define RCU_FANOUT_3   (RCU_FANOUT_2 * CONFIG_RCU_FANOUT)

Definition at line 41 of file rcutree.h.

#define RCU_FANOUT_4   (RCU_FANOUT_3 * CONFIG_RCU_FANOUT)

Definition at line 42 of file rcutree.h.

#define rcu_for_each_leaf_node (   rsp,
  rnp 
)
Value:
for ((rnp) = (rsp)->level[rcu_num_lvls - 1]; \
(rnp) < &(rsp)->node[rcu_num_nodes]; (rnp)++)

Definition at line 229 of file rcutree.h.

#define rcu_for_each_node_breadth_first (   rsp,
  rnp 
)
Value:
for ((rnp) = &(rsp)->node[0]; \
(rnp) < &(rsp)->node[rcu_num_nodes]; (rnp)++)

Definition at line 210 of file rcutree.h.

#define rcu_for_each_nonleaf_node_breadth_first (   rsp,
  rnp 
)
Value:
for ((rnp) = &(rsp)->node[0]; \
(rnp) < (rsp)->level[rcu_num_lvls - 1]; (rnp)++)

Definition at line 219 of file rcutree.h.

#define RCU_FORCE_QS   3 /* Need to force quiescent state. */

Definition at line 328 of file rcutree.h.

#define RCU_GP_FLAG_FQS   0x2 /* Need grace-period quiescent-state forcing. */

Definition at line 428 of file rcutree.h.

#define RCU_GP_FLAG_INIT   0x1 /* Need grace-period initialization. */

Definition at line 427 of file rcutree.h.

#define RCU_GP_IDLE   0 /* No grace period in progress. */

Definition at line 325 of file rcutree.h.

#define RCU_GP_INIT   1 /* Grace period being initialized. */

Definition at line 326 of file rcutree.h.

#define RCU_JIFFIES_TILL_FORCE_QS   3 /* for rsp->jiffies_force_qs */

Definition at line 331 of file rcutree.h.

#define RCU_KTHREAD_MAX   4

Definition at line 117 of file rcutree.h.

#define RCU_KTHREAD_OFFCPU   3

Definition at line 115 of file rcutree.h.

#define RCU_KTHREAD_RUNNING   1

Definition at line 113 of file rcutree.h.

#define RCU_KTHREAD_STOPPED   0

Definition at line 112 of file rcutree.h.

#define RCU_KTHREAD_WAITING   2

Definition at line 114 of file rcutree.h.

#define RCU_KTHREAD_YIELDING   4

Definition at line 116 of file rcutree.h.

#define RCU_NEXT_READY_TAIL   2 /* Also RCU_NEXT head. */

Definition at line 236 of file rcutree.h.

#define RCU_NEXT_SIZE   4

Definition at line 238 of file rcutree.h.

#define RCU_NEXT_TAIL   3

Definition at line 237 of file rcutree.h.

#define RCU_NUM_LVLS   1

Definition at line 45 of file rcutree.h.

#define RCU_OFL_TASKS_EXP_GP   0x2 /* Tasks blocking expedited */

Definition at line 438 of file rcutree.h.

#define RCU_OFL_TASKS_NORM_GP   0x1 /* Tasks blocking normal */

Definition at line 436 of file rcutree.h.

#define RCU_SAVE_DYNTICK   2 /* Need to scan dyntick state. */

Definition at line 327 of file rcutree.h.

#define RCU_SIGNAL_INIT   RCU_SAVE_DYNTICK

Definition at line 329 of file rcutree.h.

#define RCU_STALL_DELAY_DELTA   0

Definition at line 336 of file rcutree.h.

#define RCU_STALL_RAT_DELAY   2 /* Allow other CPUs time */

Definition at line 338 of file rcutree.h.

Definition at line 76 of file rcutree.h.

#define rcu_wait (   cond)
Value:
do { \
for (;;) { \
set_current_state(TASK_INTERRUPTIBLE); \
if (cond) \
break; \
schedule(); \
} \
__set_current_state(TASK_RUNNING); \
} while (0)

Definition at line 343 of file rcutree.h.

#define RCU_WAIT_TAIL   1 /* Also RCU_NEXT_READY head. */

Definition at line 235 of file rcutree.h.

Function Documentation

void call_rcu ( struct rcu_head head,
void(*)(struct rcu_head *rcu)  func 
)
DECLARE_PER_CPU ( struct rcu_data  ,
rcu_sched_data   
)
DECLARE_PER_CPU ( struct rcu_data  ,
rcu_bh_data   
)
long rcu_batches_completed ( void  )

Definition at line 909 of file rcutree_plugin.h.

Variable Documentation

struct rcu_node ____cacheline_internodealigned_in_smp
struct rcu_state rcu_bh_state

Definition at line 85 of file rcutree.c.

int rcu_num_lvls
int rcu_num_nodes
struct rcu_state rcu_sched_state

Definition at line 81 of file rcutree.c.

struct list_head rcu_struct_flavors