padata currently uses one per-CPU workqueue per instance for all work. Prepare for running parallel jobs on an unbound workqueue by introducing dedicated workqueues for parallel and serial work.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -127,7 +127,8 @@ struct parallel_data { · 126 unmodified lines | |||
| 127 | * struct padata_instance - The overall control structure. | 127 | * struct padata_instance - The overall control structure. |
| 128 | * | 128 | * |
| 129 | * @cpu_notifier: cpu hotplug notifier. | 129 | * @cpu_notifier: cpu hotplug notifier. |
| 130 | * @wq: The workqueue in use. | 130 | * @parallel_wq: The workqueue used for parallel work. |
| 131 | * @serial_wq: The workqueue used for serial work. | ||
| 131 | * @pd: The internal control structure. | 132 | * @pd: The internal control structure. |
| 132 | * @cpumask: User supplied cpumasks for parallel and serial works. | 133 | * @cpumask: User supplied cpumasks for parallel and serial works. |
| 133 | * @cpumask_change_notifier: Notifiers chain for user-defined notify | 134 | * @cpumask_change_notifier: Notifiers chain for user-defined notify |
| @@ -139,7 +140,8 @@ struct parallel_data { · 5 unmodified lines | |||
| 139 | */ | 140 | */ |
| 140 | struct padata_instance { | 141 | struct padata_instance { |
| 141 | struct hlist_node node; | 142 | struct hlist_node node; |
| 142 | struct workqueue_struct *wq; | 143 | struct workqueue_struct *parallel_wq; |
| 144 | struct workqueue_struct *serial_wq; | ||
| 143 | struct parallel_data *pd; | 145 | struct parallel_data *pd; |
| 144 | struct padata_cpumask cpumask; | 146 | struct padata_cpumask cpumask; |
| 145 | struct blocking_notifier_head cpumask_change_notifier; | 147 | struct blocking_notifier_head cpumask_change_notifier; |