Re: [PATCH 2/2] test-ww_mutex: Fix deadlock in test_cycle_work

From: Bradley Morgan

Date: Thu Aug 06 2026 - 20:30:13 EST


> + workqueue_set_max_active(wq, cycle_ncpus + 1);
> + workqueue_set_min_active(wq, cycle_ncpus + 1);

Works on any topology. min_active is the floor of that clamp, so
every node ends up with N + 1 slots.

One thing... set_max before set_min is load bearing, not style. heh
workqueue_set_min_active() clamps against saved_max_active:

saved_min_active = clamp(min_active, 0, wq->saved_max_active);

so set_min first would silently cap at the old 1024. The comment
tells the story the other way around, heh. Something like... Feel free to
bikeshed.

/*
* test_cycle_work() needs all N + 1 works running at once.
* Raise max first, min_active is clamped to it.
*/

I mean, this doesn't particularly kill the patch. Please add

Reviewed-by: Bradley Morgan <include@xxxxxxxxx>

Thanks!