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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240904080326.1132275-7-tj@kernel.org>
Date: Tue,  3 Sep 2024 22:03:08 -1000
From: Tejun Heo <tj@...nel.org>
To: void@...ifault.com
Cc: kernel-team@...a.com,
	linux-kernel@...r.kernel.org,
	peterz@...radead.org,
	Tejun Heo <tj@...nel.org>
Subject: [PATCH 6/6] sched_ext: Remove sched_class->switch_class()

With sched_ext converted to use put_prev_task() for class switch detection,
there's no user of switch_class() left. Drop it.

Signed-off-by: Tejun Heo <tj@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
---
 kernel/sched/core.c  | 12 +-----------
 kernel/sched/sched.h |  2 --
 2 files changed, 1 insertion(+), 13 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 91bedf5d9f89..df56301bfa97 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5965,22 +5965,12 @@ __pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
 	for_each_active_class(class) {
 		if (class->pick_next_task) {
 			p = class->pick_next_task(rq, prev);
-			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);
+			if (p)
 				return p;
-			}
 		} else {
 			p = class->pick_task(rq);
 			if (p) {
-				const struct sched_class *prev_class = prev->sched_class;
-
 				put_prev_set_next_task(rq, prev, p);
-
-				if (class != prev_class && prev_class->switch_class)
-					prev_class->switch_class(rq, p);
 				return p;
 			}
 		}
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 477e7a861d10..73ba0cfe4226 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -2385,8 +2385,6 @@ struct sched_class {
 	void (*put_prev_task)(struct rq *rq, struct task_struct *p, struct task_struct *next);
 	void (*set_next_task)(struct rq *rq, struct task_struct *p, bool first);
 
-	void (*switch_class)(struct rq *rq, struct task_struct *next);
-
 #ifdef CONFIG_SMP
 	int  (*select_task_rq)(struct task_struct *p, int task_cpu, int flags);
 
-- 
2.46.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ