linux-next: manual merge of the tip tree with the workqueues tree

From: Stephen Rothwell
Date: Sun Feb 25 2024 - 21:54:12 EST


Hi all,

Today's linux-next merge of the tip tree got a conflict in:

kernel/workqueue.c

between commit:

aae17ebb53cd ("workqueue: Avoid using isolated cpus' timers on queue_delayed_work")

from the workqueues tree and commit:

c0e8c5b59949 ("workqueue: Use global variant for add_timer()")

from the tip tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

--
Cheers,
Stephen Rothwell

diff --cc kernel/workqueue.c
index 65a27be81452,78eaea2e5d72..000000000000
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@@ -2545,18 -1958,10 +2545,18 @@@ static void __queue_delayed_work(int cp
dwork->cpu = cpu;
timer->expires = jiffies + delay;

- if (unlikely(cpu != WORK_CPU_UNBOUND))
+ if (housekeeping_enabled(HK_TYPE_TIMER)) {
+ /* If the current cpu is a housekeeping cpu, use it. */
+ cpu = smp_processor_id();
+ if (!housekeeping_test_cpu(cpu, HK_TYPE_TIMER))
+ cpu = housekeeping_any_cpu(HK_TYPE_TIMER);
add_timer_on(timer, cpu);
- else
- add_timer_global(timer);
+ } else {
+ if (likely(cpu == WORK_CPU_UNBOUND))
- add_timer(timer);
++ add_timer_global(timer);
+ else
+ add_timer_on(timer, cpu);
+ }
}

/**

Attachment: pgpfghaBw8xht.pgp
Description: OpenPGP digital signature