mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-04 13:21:45 +00:00
rcu: Add call_rcu_tasks()
This commit adds a new RCU-tasks flavor of RCU, which provides call_rcu_tasks(). This RCU flavor's quiescent states are voluntary context switch (not preemption!) and userspace execution (not the idle loop -- use some sort of schedule_on_each_cpu() if you need to handle the idle tasks. Note that unlike other RCU flavors, these quiescent states occur in tasks, not necessarily CPUs. Includes fixes from Steven Rostedt. This RCU flavor is assumed to have very infrequent latency-tolerant updaters. This assumption permits significant simplifications, including a single global callback list protected by a single global lock, along with a single task-private linked list containing all tasks that have not yet passed through a quiescent state. If experience shows this assumption to be incorrect, the required additional complexity will be added. Suggested-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
This commit is contained in:
parent
11ed7f934c
commit
8315f42295
7 changed files with 242 additions and 11 deletions
|
@ -117,6 +117,14 @@ extern struct group_info init_groups;
|
|||
#else
|
||||
#define INIT_TASK_RCU_PREEMPT(tsk)
|
||||
#endif
|
||||
#ifdef CONFIG_TASKS_RCU
|
||||
#define INIT_TASK_RCU_TASKS(tsk) \
|
||||
.rcu_tasks_holdout = false, \
|
||||
.rcu_tasks_holdout_list = \
|
||||
LIST_HEAD_INIT(tsk.rcu_tasks_holdout_list),
|
||||
#else
|
||||
#define INIT_TASK_RCU_TASKS(tsk)
|
||||
#endif
|
||||
|
||||
extern struct cred init_cred;
|
||||
|
||||
|
@ -224,6 +232,7 @@ extern struct task_group root_task_group;
|
|||
INIT_FTRACE_GRAPH \
|
||||
INIT_TRACE_RECURSION \
|
||||
INIT_TASK_RCU_PREEMPT(tsk) \
|
||||
INIT_TASK_RCU_TASKS(tsk) \
|
||||
INIT_CPUSET_SEQ(tsk) \
|
||||
INIT_RT_MUTEXES(tsk) \
|
||||
INIT_VTIME(tsk) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue