[PATCH 0/2] workqueue: Make WQ_UNBOUND the default behavior

Marco Crivellari posted 2 patches 3 weeks, 1 day ago
There is a newer version of this series
Documentation/core-api/workqueue.rst |  2 ++
kernel/workqueue.c                   | 14 +++++++-------
2 files changed, 9 insertions(+), 7 deletions(-)
[PATCH 0/2] workqueue: Make WQ_UNBOUND the default behavior
Posted by Marco Crivellari 3 weeks, 1 day ago
Hi,

Currently alloc_workqueue() make sure one among WQ_UNBOUND or WQ_PERCPU is
present. This is enforced warning and setting WQ_PERCPU as default when
alloc_workqueue() without WQ_PERCPU or WQ_UNBOUND.

[ P1 ] change this behavior: if no flags are specified, WQ_UNBOUND is
set by default, changing the default behavior when flags are not present.

The WARN_ONCE() when neither flags are present has been removed and it has
been replaced by pr_warn_once(): from now on, every alloc_users()
without WQ_PERCPU will be considered unbound.

Q: I decided to pr_warn_once() just to make sure users are aware of the new
behavior. It makes sense or we can just drop it directly?
I don't think the WARN_ONCE() is appropriate now, for this specific path.

[ P2 ] updates the documentation accordingly.

Thanks!

Marco Crivellari (2):
  workqueue: Make alloc_workqueue() unbound by default
  doc: Update WQ_UNBOUND documentation

 Documentation/core-api/workqueue.rst |  2 ++
 kernel/workqueue.c                   | 14 +++++++-------
 2 files changed, 9 insertions(+), 7 deletions(-)

-- 
2.55.0