History

workqueue: Remove the arguments @hotplug_cpu and @online from wq_update_pod()

The arguments @hotplug_cpu and @online are not used in wq_update_pod() since the functions called by wq_update_pod() don't need them.

Lai Jiangshan committed 2 years ago

Commit d160a581 parent 88a41b11 file · +5 −8Browse files

Showing the changes to kernel/workqueue.c (1 of 1 file). Show all

Unified · Split

kernel/workqueue.c+5−8
@@ -5344,8 +5344,6 @@ int apply_workqueue_attrs(struct workqueue_struct *wq, · 5343 unmodified lines
53445344 * wq_update_pod - update pod affinity of a wq for CPU hot[un]plug
53455345 * @wq: the target workqueue
53465346 * @cpu: the CPU to update pool association for
5347− * @hotplug_cpu: the CPU coming up or going down
5348− * @online: whether @cpu is coming up or going down
53495347 *
53505348 * This function is to be called from %CPU_DOWN_PREPARE, %CPU_ONLINE and
53515349 * %CPU_DOWN_FAILED. @cpu is being hot[un]plugged, update pod affinity of
@@ -5362,8 +5360,7 @@ int apply_workqueue_attrs(struct workqueue_struct *wq, · 10 unmodified lines
53625360 * CPU_DOWN. If a workqueue user wants strict affinity, it's the user's
53635361 * responsibility to flush the work item from CPU_DOWN_PREPARE.
53645362 */
5365−static void wq_update_pod(struct workqueue_struct *wq, int cpu,
5366− int hotplug_cpu, bool online)
5363+static void wq_update_pod(struct workqueue_struct *wq, int cpu)
53675364 {
53685365 struct pool_workqueue *old_pwq = NULL, *pwq;
53695366 struct workqueue_attrs *target_attrs;
@@ -6584,7 +6581,7 @@ int workqueue_online_cpu(unsigned int cpu) · 1214 unmodified lines
65846581 int tcpu;
65856582
65866583 for_each_cpu(tcpu, pt->pod_cpus[pt->cpu_pod[cpu]])
6587− wq_update_pod(wq, tcpu, cpu, true);
6584+ wq_update_pod(wq, tcpu);
65886585
65896586 mutex_lock(&wq->mutex);
65906587 wq_update_node_max_active(wq, -1);
@@ -6619,7 +6616,7 @@ int workqueue_offline_cpu(unsigned int cpu) · 28 unmodified lines
66196616 int tcpu;
66206617
66216618 for_each_cpu(tcpu, pt->pod_cpus[pt->cpu_pod[cpu]])
6622− wq_update_pod(wq, tcpu, cpu, false);
6619+ wq_update_pod(wq, tcpu);
66236620
66246621 mutex_lock(&wq->mutex);
66256622 wq_update_node_max_active(wq, cpu);
@@ -6908,7 +6905,7 @@ static int wq_affn_dfl_set(const char *val, const struct kernel_param *kp) · 282 unmodified lines
69086905
69096906 list_for_each_entry(wq, &workqueues, list) {
69106907 for_each_online_cpu(cpu) {
6911− wq_update_pod(wq, cpu, cpu, true);
6908+ wq_update_pod(wq, cpu);
69126909 }
69136910 }
69146911
@@ -7927,7 +7924,7 @@ void __init workqueue_init_topology(void) · 1012 unmodified lines
79277924 */
79287925 list_for_each_entry(wq, &workqueues, list) {
79297926 for_each_online_cpu(cpu)
7930− wq_update_pod(wq, cpu, cpu, true);
7927+ wq_update_pod(wq, cpu);
79317928 if (wq->flags & WQ_UNBOUND) {
79327929 mutex_lock(&wq->mutex);
79337930 wq_update_node_max_active(wq, -1);