Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: replace use of system_unbound_wq with system_dfl_wq

Currently if a user enqueue a work item using schedule_delayed_work() the
used wq is "system_wq" (per-cpu wq) while queue_delayed_work() use
WORK_CPU_UNBOUND (used when a cpu is not specified). The same applies to
schedule_work() that is using system_wq and queue_work(), that makes use
again of WORK_CPU_UNBOUND.

This lack of consistentcy cannot be addressed without refactoring the API.

system_unbound_wq should be the default workqueue so as not to enforce
locality constraints for random work whenever it's not required.

Adding system_dfl_wq to encourage its use when unbound work should be used.

The old system_unbound_wq will be kept for a few release cycles.

Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
Link: https://patch.msgid.link/20250918142427.309519-2-marco.crivellari@suse.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Marco Crivellari and committed by
Jakub Kicinski
9870d350 dfff1808

+7 -7
+1 -1
drivers/net/macvlan.c
··· 369 369 } 370 370 spin_unlock(&port->bc_queue.lock); 371 371 372 - queue_work(system_unbound_wq, &port->bc_work); 372 + queue_work(system_dfl_wq, &port->bc_work); 373 373 374 374 if (err) 375 375 goto free_nskb;
+3 -3
drivers/net/netdevsim/dev.c
··· 851 851 nsim_dev = nsim_trap_data->nsim_dev; 852 852 853 853 if (!devl_trylock(priv_to_devlink(nsim_dev))) { 854 - queue_delayed_work(system_unbound_wq, 854 + queue_delayed_work(system_dfl_wq, 855 855 &nsim_dev->trap_data->trap_report_dw, 1); 856 856 return; 857 857 } ··· 867 867 cond_resched(); 868 868 } 869 869 devl_unlock(priv_to_devlink(nsim_dev)); 870 - queue_delayed_work(system_unbound_wq, 870 + queue_delayed_work(system_dfl_wq, 871 871 &nsim_dev->trap_data->trap_report_dw, 872 872 msecs_to_jiffies(NSIM_TRAP_REPORT_INTERVAL_MS)); 873 873 } ··· 924 924 925 925 INIT_DELAYED_WORK(&nsim_dev->trap_data->trap_report_dw, 926 926 nsim_dev_trap_report_work); 927 - queue_delayed_work(system_unbound_wq, 927 + queue_delayed_work(system_dfl_wq, 928 928 &nsim_dev->trap_data->trap_report_dw, 929 929 msecs_to_jiffies(NSIM_TRAP_REPORT_INTERVAL_MS)); 930 930
+1 -1
net/unix/garbage.c
··· 592 592 void unix_gc(void) 593 593 { 594 594 WRITE_ONCE(gc_in_progress, true); 595 - queue_work(system_unbound_wq, &unix_gc_work); 595 + queue_work(system_dfl_wq, &unix_gc_work); 596 596 } 597 597 598 598 #define UNIX_INFLIGHT_TRIGGER_GC 16000