Re: [PATCH v4 09/10] workqueue: Implement system-wide nr_active enforcement for unbound workqueues

From: Mark Brown
Date: Wed Jan 31 2024 - 16:56:23 EST


On Tue, Jan 30, 2024 at 06:24:51PM -1000, Tejun Heo wrote:

> Ah, I see. How about the following?
>
> Thanks.
>
> diff --git a/kernel/workqueue.c b/kernel/workqueue.c
> index 9221a4c57ae1..31c1373505d8 100644
> --- a/kernel/workqueue.c
> +++ b/kernel/workqueue.c
> @@ -1510,7 +1510,7 @@ static void wq_update_node_max_active(struct workqueue_struct *wq, int off_cpu)
>
> lockdep_assert_held(&wq->mutex);
>
> - if (!cpumask_test_cpu(off_cpu, effective))
> + if (off_cpu >= 0 && !cpumask_test_cpu(off_cpu, effective))
> off_cpu = -1;

This commit was also breaking at91sam9g20ek (and still is in today's
-next), the fix here gets that booting again:

Tested-by: Mark Brown <broonie@xxxxxxxxxx>

Attachment: signature.asc
Description: PGP signature