public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH wq/for-6.9 v4 0/4] workqueue: Enable unbound cpumask update on ordered workqueues
@ 2024-02-07  1:19 Waiman Long
  2024-02-07  1:19 ` [PATCH wq/for-6.9 v4 1/4] workqueue: Link pwq's into wq->pwqs from oldest to newest Waiman Long
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Waiman Long @ 2024-02-07  1:19 UTC (permalink / raw)
  To: Tejun Heo, Lai Jiangshan
  Cc: linux-kernel, Juri Lelli, Cestmir Kalina, Alex Gladkov, Phil Auld,
	Costa Shulyupin, Waiman Long

 v4:
  - [v3] https://lore.kernel.org/lkml/20240205194602.871505-1-longman@redhat.com/
  - Rebase on the latest for-6.9 branch again & discard the use of
    __WQ_ORDERED_EXPLICIT and resetting of __WQ_ORDERED.
  - Add a new patch 1 to change the ordering of pwq's in wq->pwqs from
    oldest to newest.
  - Change the terminalogy from freeze/thaw to plug/unplug.
  - Allow more than 2 pwq's in wq->pwqs of ordered workqueue but only the
    oldest one is unplugged. This eliminates the need to wait for
    the draining of extra pwq in workqueue_apply_unbound_cpumask().

 v3:
  - [v2] https://lore.kernel.org/lkml/20240203154334.791910-1-longman@redhat.com/
  - Drop patch 1 as it has been merged into the for-6.9 branch.
  - Use rcu_access_pointer() to access wq->dfl_pwq.
  - Use RCU protection instead of acquiring wq->mutex in
    apply_wqattrs_cleanup().

 v2:
  - [v1] https://lore.kernel.org/all/20240130183336.511948-1-longman@redhat.com/
  - Rebased on top of wq's for-v6.9 branch.
  - Use the new pwq_tryinc_nr_active() mechanism to freeze the new
    pwq of an ordered workqueue until the old pwq has been properly
    drained to maintain ordering.
  - Make rescuer follow changes in workqueue unbound cpumask as well
    as its sysfs cpumask, if available.

Ordered workqueues does not currently follow changes made to the
global unbound cpumask because per-pool workqueue changes may break
the ordering guarantee. IOW, a work function in an ordered workqueue
may run on a cpuset isolated CPU.

This series enables ordered workqueues to follow changes made to the
global unbound cpumask by temporaily suspending (plugging) the execution
of work items in the newly allocated pool_workqueue until the old pwq
has been properly drained.

The cpumask of the rescuer task of each workqueue is also made to follow
changes in workqueue unbound cpumask as well as its sysfs cpumask,
if available.

Juri Lelli (1):
  kernel/workqueue: Let rescuers follow unbound wq cpumask changes

Waiman Long (3):
  workqueue: Link pwq's into wq->pwqs from oldest to newest
  workqueue: Enable unbound cpumask update on ordered workqueues
  workqueue: Bind unbound workqueue rescuer to wq_unbound_cpumask

 kernel/workqueue.c | 111 ++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 99 insertions(+), 12 deletions(-)

-- 
2.39.3


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-02-07 21:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-07  1:19 [PATCH wq/for-6.9 v4 0/4] workqueue: Enable unbound cpumask update on ordered workqueues Waiman Long
2024-02-07  1:19 ` [PATCH wq/for-6.9 v4 1/4] workqueue: Link pwq's into wq->pwqs from oldest to newest Waiman Long
2024-02-07  1:19 ` [PATCH wq/for-6.9 v4 2/4] workqueue: Enable unbound cpumask update on ordered workqueues Waiman Long
2024-02-07 17:25   ` Tejun Heo
2024-02-07 20:59     ` Waiman Long
2024-02-07 21:18       ` Tejun Heo
2024-02-07  1:19 ` [PATCH wq/for-6.9 v4 3/4] kernel/workqueue: Let rescuers follow unbound wq cpumask changes Waiman Long
2024-02-07  1:19 ` [PATCH wq/for-6.9 v4 4/4] workqueue: Bind unbound workqueue rescuer to wq_unbound_cpumask Waiman Long

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox