linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the tip tree with the workqueues tree
@ 2024-02-26  2:53 Stephen Rothwell
  2024-02-26  4:35 ` Leonardo Bras Soares Passos
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Rothwell @ 2024-02-26  2:53 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra, Tejun Heo
  Cc: Anna-Maria Behnsen, Leonardo Bras, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1544 bytes --]

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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: manual merge of the tip tree with the workqueues tree
  2024-02-26  2:53 linux-next: manual merge of the tip tree with the workqueues tree Stephen Rothwell
@ 2024-02-26  4:35 ` Leonardo Bras Soares Passos
  0 siblings, 0 replies; 2+ messages in thread
From: Leonardo Bras Soares Passos @ 2024-02-26  4:35 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	Tejun Heo, Anna-Maria Behnsen, Linux Kernel Mailing List,
	Linux Next Mailing List

On Sun, Feb 25, 2024 at 11:54 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> 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);
>  +      }
>   }
>
>   /**

Fix looks perfect.

Thanks Stephen!
Leo


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

end of thread, other threads:[~2024-02-26  4:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-26  2:53 linux-next: manual merge of the tip tree with the workqueues tree Stephen Rothwell
2024-02-26  4:35 ` Leonardo Bras Soares Passos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).