lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20240801124545.43e3a455@canb.auug.org.au>
Date: Thu, 1 Aug 2024 12:45:45 +1000
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Tejun Heo <tj@...nel.org>, Thomas Gleixner <tglx@...utronix.de>, Ingo
 Molnar <mingo@...hat.com>, "H. Peter Anvin" <hpa@...or.com>, Peter Zijlstra
 <peterz@...radead.org>
Cc: "Joel Fernandes (Google)" <joel@...lfernandes.org>, Daniel Bristot de
 Oliveira <bristot@...nel.org>, Linux Kernel Mailing List
 <linux-kernel@...r.kernel.org>, Linux Next Mailing List
 <linux-next@...r.kernel.org>, Yang Yingliang <yangyingliang@...wei.com>
Subject: linux-next: manual merge of the sched-ext tree with the tip tree

Hi all,

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

  kernel/sched/core.c

between commits:

  c245910049d0 ("sched/core: Add clearing of ->dl_server in put_prev_task_balance()")
  31b164e2e4af ("sched/smt: Introduce sched_smt_present_inc/dec() helper")

from the tip tree and commits:

  60c27fb59f6c ("sched_ext: Implement sched_ext_ops.cpu_online/offline()")
  a7a9fc549293 ("sched_ext: Add boilerplate for extensible scheduler class")

from the sched-ext tree.

I fixed it up (I think, 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/sched/core.c
index 73fa0290fd8f,22f86d5e9231..000000000000
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@@ -5878,10 -5901,23 +5947,15 @@@ __pick_next_task(struct rq *rq, struct 
  restart:
  	put_prev_task_balance(rq, prev, rf);
  
- 	for_each_class(class) {
 -	/*
 -	 * We've updated @prev and no longer need the server link, clear it.
 -	 * Must be done before ->pick_next_task() because that can (re)set
 -	 * ->dl_server.
 -	 */
 -	if (prev->dl_server)
 -		prev->dl_server = NULL;
 -
+ 	for_each_active_class(class) {
  		p = class->pick_next_task(rq);
- 		if (p)
+ 		if (p) {
+ 			const struct sched_class *prev_class = prev->sched_class;
+ 
+ 			if (class != prev_class && prev_class->switch_class)
+ 				prev_class->switch_class(rq, p);
  			return p;
+ 		}
  	}
  
  	BUG(); /* The idle class should always have a runnable task. */
@@@ -8040,8 -8056,16 +8122,10 @@@ int sched_cpu_deactivate(unsigned int c
  	 */
  	synchronize_rcu();
  
 -	rq_lock_irqsave(rq, &rf);
 -	if (rq->rd) {
 -		BUG_ON(!cpumask_test_cpu(cpu, rq->rd->span));
 -		set_rq_offline(rq);
 -	}
 -	rq_unlock_irqrestore(rq, &rf);
 +	sched_set_rq_offline(rq, cpu);
  
+ 	scx_rq_deactivate(rq);
+ 
 -#ifdef CONFIG_SCHED_SMT
  	/*
  	 * When going down, decrement the number of cores with SMT present.
  	 */

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ