Skip to contentSkip to conversation

s390/hiperdispatch: use system_dfl_wq to reschedule hd_capacity_work

PATCH Applied Euan Bourke 4 participants 4 messages Sep 11 – Sep 14 s390

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 s390/hiperdispatch: use system_dfl_wq to reschedule hd_capacity_work

In hd_enable_hiperdispatch(), hd_capacity_work is scheduled on system_dfl_wq, however the work function reschedules itself with schedule_delayed_work(), which uses system_percpu_wq.

Hiperdispatch does not benefit from using the percpu workqueue. Use queue_delayed_work() with system_dfl_wq for consistency.

Changing the workqueue from system_percpu_wq to system_dfl_wq causes no functional changes.

---
v2:
- use queue_delayed_work() instead of mod_delayed_work()

 arch/s390/kernel/hiperdispatch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/s390/kernel/hiperdispatch.c +1 -1
index 217206522266..8494823559b1 100644
@@ -265,7 +265,7 @@ static void hd_capacity_work_fn(struct work_struct *work)
 	}
 	trace_s390_hd_work_fn(steal_percentage, hd_entitled_cores, hd_high_capacity_cores);
 	mutex_unlock(&smp_cpu_state_mutex);
-	schedule_delayed_work(&hd_capacity_work, HD_DELAY_INTERVAL);
+	queue_delayed_work(system_dfl_wq, &hd_capacity_work, HD_DELAY_INTERVAL);
 }
 
 static int hiperdispatch_ctl_handler(const struct ctl_table *ctl, int write,
Signature · 1 line
2.54.0
#1 lore raw
Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 11 lines

In hd_enable_hiperdispatch(), hd_capacity_work is scheduled on system_dfl_wq, however the work function reschedules itself with schedule_delayed_work(), which uses system_percpu_wq.

Hiperdispatch does not benefit from using the percpu workqueue. Use queue_delayed_work() with system_dfl_wq for consistency.

Changing the workqueue from system_percpu_wq to system_dfl_wq causes no functional changes.

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Tested-by Reviewed-by on v2 1/1
#2 lore raw
In reply to Euan Bourke
Quoted 10 lines · Euan Bourke

In hd_enable_hiperdispatch(), hd_capacity_work is scheduled on system_dfl_wq, however the work function reschedules itself with schedule_delayed_work(), which uses system_percpu_wq.

Hiperdispatch does not benefit from using the percpu workqueue. Use queue_delayed_work() with system_dfl_wq for consistency.

Changing the workqueue from system_percpu_wq to system_dfl_wq causes no functional changes.

Quoted 8 lines

---
v2:
- use queue_delayed_work() instead of mod_delayed_work()

  arch/s390/kernel/hiperdispatch.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

This disparity is first introduced at;
commit 72105fc1c1cb ("s390: Replace use of system_wq with system_dfl_wq")

I must have missed that schedule_delayed_work() always moves the work item from its original work queue to system_percpu_wq.

Thanks for the patch and feel free to put my r-b and tested-by as it looks good and tela test cases for hiperdispatch show no regression.

maintainer Applied
#3 lore raw
In reply to Euan Bourke
Quoted 10 lines · Euan Bourke

In hd_enable_hiperdispatch(), hd_capacity_work is scheduled on system_dfl_wq, however the work function reschedules itself with schedule_delayed_work(), which uses system_percpu_wq.

Hiperdispatch does not benefit from using the percpu workqueue. Use queue_delayed_work() with system_dfl_wq for consistency.

Changing the workqueue from system_percpu_wq to system_dfl_wq causes no functional changes.

Quoted 7 lines

---
v2:
- use queue_delayed_work() instead of mod_delayed_work()

 arch/s390/kernel/hiperdispatch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks!