summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pagano <mpagano@gentoo.org>2023-05-10 12:04:51 -0400
committerMike Pagano <mpagano@gentoo.org>2023-05-10 12:04:51 -0400
commit0d62c0fdfda6ebc693ddcfb5841feb69c44391f7 (patch)
tree03cf396009fb1e58373eb6f4831b3298a650b151
parentLinux patch 6.2.14 (diff)
downloadlinux-patches-0d62c0fdfda6ebc693ddcfb5841feb69c44391f7.tar.gz
linux-patches-0d62c0fdfda6ebc693ddcfb5841feb69c44391f7.tar.bz2
linux-patches-0d62c0fdfda6ebc693ddcfb5841feb69c44391f7.zip
sched/alt: Remove psi support
Bug: https://bugs.gentoo.org/904514 Signed-off-by: Mike Pagano <mpagano@gentoo.org>
-rw-r--r--0000_README4
-rw-r--r--5022_BMQ-and-PDS-remove-psi-support.patch94
2 files changed, 98 insertions, 0 deletions
diff --git a/0000_README b/0000_README
index d3c9fbfe..00341fe3 100644
--- a/0000_README
+++ b/0000_README
@@ -146,3 +146,7 @@ Desc: BMQ(BitMap Queue) Scheduler. A new CPU scheduler developed from PDS(incl
Patch: 5021_BMQ-and-PDS-gentoo-defaults.patch
From: https://gitweb.gentoo.org/proj/linux-patches.git/
Desc: Set defaults for BMQ. Add archs as people test, default to N
+
+Patch: 5022_BMQ-and-PDS-remove-psi-support.patch
+From: https://gitweb.gentoo.org/proj/linux-patches.git/
+Desc: Sched/alt: Remove psi support
diff --git a/5022_BMQ-and-PDS-remove-psi-support.patch b/5022_BMQ-and-PDS-remove-psi-support.patch
new file mode 100644
index 00000000..4390e2d5
--- /dev/null
+++ b/5022_BMQ-and-PDS-remove-psi-support.patch
@@ -0,0 +1,94 @@
+From 542887ccaeadc65843ec171bccc87f8aa8bbca95 Mon Sep 17 00:00:00 2001
+From: Alfred Chen <cchalpha@gmail.com>
+Date: Wed, 26 Apr 2023 16:38:14 +0000
+Subject: [PATCH] sched/alt: Remove psi support
+
+There are issues(#70, #72, #79) with psi support. Removing the
+support of psi as it doesn't bring much gain.
+---
+ init/Kconfig | 1 +
+ kernel/sched/alt_core.c | 8 --------
+ kernel/sched/alt_sched.h | 1 -
+ 3 files changed, 1 insertion(+), 9 deletions(-)
+
+diff --git a/init/Kconfig b/init/Kconfig
+index 454f792df9dd..dff86592555a 100644
+--- a/init/Kconfig
++++ b/init/Kconfig
+@@ -629,6 +629,7 @@ config TASK_IO_ACCOUNTING
+
+ config PSI
+ bool "Pressure stall information tracking"
++ depends on !SCHED_ALT
+ help
+ Collect metrics that indicate how overcommitted the CPU, memory,
+ and IO capacity are in the system.
+diff --git a/kernel/sched/alt_core.c b/kernel/sched/alt_core.c
+index af4d840d4bb7..37dfdc41d2a7 100644
+--- a/kernel/sched/alt_core.c
++++ b/kernel/sched/alt_core.c
+@@ -588,7 +588,6 @@ static void update_rq_clock_task(struct rq *rq, s64 delta)
+
+ rq->prev_irq_time += irq_delta;
+ delta -= irq_delta;
+- psi_account_irqtime(rq->curr, irq_delta);
+ #endif
+ #ifdef CONFIG_PARAVIRT_TIME_ACCOUNTING
+ if (static_key_false((&paravirt_steal_rq_enabled))) {
+@@ -769,7 +768,6 @@ unsigned long get_wchan(struct task_struct *p)
+ */
+ #define __SCHED_DEQUEUE_TASK(p, rq, flags, func) \
+ sched_info_dequeue(rq, p); \
+- psi_dequeue(p, flags & DEQUEUE_SLEEP); \
+ \
+ list_del(&p->sq_node); \
+ if (list_empty(&rq->queue.heads[p->sq_idx])) { \
+@@ -779,7 +777,6 @@ unsigned long get_wchan(struct task_struct *p)
+
+ #define __SCHED_ENQUEUE_TASK(p, rq, flags) \
+ sched_info_enqueue(rq, p); \
+- psi_enqueue(p, flags & ENQUEUE_WAKEUP); \
+ \
+ p->sq_idx = task_sched_prio_idx(p, rq); \
+ list_add_tail(&p->sq_node, &rq->queue.heads[p->sq_idx]); \
+@@ -2954,7 +2951,6 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state,
+ }
+
+ wake_flags |= WF_MIGRATED;
+- psi_ttwu_dequeue(p);
+ set_task_cpu(p, cpu);
+ }
+ #else
+@@ -4828,8 +4824,6 @@ static void __sched notrace __schedule(unsigned int sched_mode)
+ */
+ ++*switch_count;
+
+- psi_sched_switch(prev, next, !task_on_rq_queued(prev));
+-
+ trace_sched_switch(sched_mode & SM_MASK_PREEMPT, prev, next, prev_state);
+
+ /* Also unlocks the rq: */
+@@ -7689,8 +7683,6 @@ void __init sched_init(void)
+ sched_init_topology_cpumask_early();
+ #endif /* SMP */
+
+- psi_init();
+-
+ preempt_dynamic_init();
+ }
+
+diff --git a/kernel/sched/alt_sched.h b/kernel/sched/alt_sched.h
+index 9fe45bf0cedf..55a15b806e87 100644
+--- a/kernel/sched/alt_sched.h
++++ b/kernel/sched/alt_sched.h
+@@ -3,7 +3,6 @@
+
+ #include <linux/context_tracking.h>
+ #include <linux/profile.h>
+-#include <linux/psi.h>
+ #include <linux/stop_machine.h>
+ #include <linux/syscalls.h>
+ #include <linux/tick.h>
+--
+GitLab
+