This commit scans the CPUs, adding each CPU's idle task to the list of tasks that need quiescent states.
Showing the changes to kernel (1 of 1 file). Show all
Unified · Split
| @@ -15,7 +15,7 @@ struct rcu_tasks; · 14 unmodified lines | |||
| 15 | typedef void (*rcu_tasks_gp_func_t)(struct rcu_tasks *rtp); | 15 | typedef void (*rcu_tasks_gp_func_t)(struct rcu_tasks *rtp); |
| 16 | typedef void (*pregp_func_t)(void); | 16 | typedef void (*pregp_func_t)(void); |
| 17 | typedef void (*pertask_func_t)(struct task_struct *t, struct list_head *hop); | 17 | typedef void (*pertask_func_t)(struct task_struct *t, struct list_head *hop); |
| 18 | typedef void (*postscan_func_t)(void); | 18 | typedef void (*postscan_func_t)(struct list_head *hop); |
| 19 | typedef void (*holdouts_func_t)(struct list_head *hop, bool ndrpt, bool *frptp); | 19 | typedef void (*holdouts_func_t)(struct list_head *hop, bool ndrpt, bool *frptp); |
| 20 | typedef void (*postgp_func_t)(struct rcu_tasks *rtp); | 20 | typedef void (*postgp_func_t)(struct rcu_tasks *rtp); |
| 21 | 21 | ||
| @@ -331,7 +331,7 @@ static void rcu_tasks_wait_gp(struct rcu_tasks *rtp) · 309 unmodified lines | |||
| 331 | rcu_read_unlock(); | 331 | rcu_read_unlock(); |
| 332 | 332 | ||
| 333 | set_tasks_gp_state(rtp, RTGS_POST_SCAN_TASKLIST); | 333 | set_tasks_gp_state(rtp, RTGS_POST_SCAN_TASKLIST); |
| 334 | rtp->postscan_func(); | 334 | rtp->postscan_func(&holdouts); |
| 335 | 335 | ||
| 336 | /* | 336 | /* |
| 337 | * Each pass through the following loop scans the list of holdout | 337 | * Each pass through the following loop scans the list of holdout |
| @@ -415,7 +415,7 @@ static void rcu_tasks_pertask(struct task_struct *t, struct list_head *hop) · 77 unmodified lines | |||
| 415 | } | 415 | } |
| 416 | 416 | ||
| 417 | /* Processing between scanning taskslist and draining the holdout list. */ | 417 | /* Processing between scanning taskslist and draining the holdout list. */ |
| 418 | void rcu_tasks_postscan(void) | 418 | void rcu_tasks_postscan(struct list_head *hop) |
| 419 | { | 419 | { |
| 420 | /* | 420 | /* |
| 421 | * Wait for tasks that are in the process of exiting. This | 421 | * Wait for tasks that are in the process of exiting. This |
| @@ -936,9 +936,17 @@ static void rcu_tasks_trace_pertask(struct task_struct *t, · 514 unmodified lines | |||
| 936 | trc_wait_for_one_reader(t, hop); | 936 | trc_wait_for_one_reader(t, hop); |
| 937 | } | 937 | } |
| 938 | 938 | ||
| 939 | /* Do intermediate processing between task and holdout scans. */ | 939 | /* |
| 940 | static void rcu_tasks_trace_postscan(void) | 940 | * Do intermediate processing between task and holdout scans and |
| 941 | * pick up the idle tasks. | ||
| 942 | */ | ||
| 943 | static void rcu_tasks_trace_postscan(struct list_head *hop) | ||
| 941 | { | 944 | { |
| 945 | int cpu; | ||
| 946 | |||
| 947 | for_each_possible_cpu(cpu) | ||
| 948 | rcu_tasks_trace_pertask(idle_task(cpu), hop); | ||
| 949 | |||
| 942 | // Re-enable CPU hotplug now that the tasklist scan has completed. | 950 | // Re-enable CPU hotplug now that the tasklist scan has completed. |
| 943 | cpus_read_unlock(); | 951 | cpus_read_unlock(); |
| 944 | 952 | ||