Update Patches, fix config
All checks were successful
PikaOS Package Build & Release (amd64-v3) / build (push) Successful in 13m11s

This commit is contained in:
ferreo 2024-09-20 22:18:02 +01:00
parent 65daf80681
commit f3d763e268
4 changed files with 110 additions and 96 deletions

View File

@ -1 +1 @@
1 2

View File

@ -1,9 +1,9 @@
From 67efcf30522cda8a81d47d35a9a89c24f5cdd00a Mon Sep 17 00:00:00 2001 From b33a0dc63069a712b021e087147a5325228b44f6 Mon Sep 17 00:00:00 2001
From: Peter Jung <admin@ptr1337.dev> From: Eric Naim <dnaim@cachyos.org>
Date: Sun, 15 Sep 2024 17:28:12 +0200 Date: Thu, 19 Sep 2024 23:20:03 +0800
Subject: [PATCH 01/11] amd-pstate Subject: [PATCH 01/11] amd-pstate
Signed-off-by: Peter Jung <admin@ptr1337.dev> Signed-off-by: Eric Naim <dnaim@cachyos.org>
--- ---
Documentation/admin-guide/pm/amd-pstate.rst | 15 +- Documentation/admin-guide/pm/amd-pstate.rst | 15 +-
arch/x86/include/asm/processor.h | 3 - arch/x86/include/asm/processor.h | 3 -
@ -715,12 +715,12 @@ index 930b6afba6f4..482e0587a041 100644
-- --
2.46.1 2.46.1
From 2676833deb16654c45007f79fb6725a3409899ff Mon Sep 17 00:00:00 2001 From 5953215fa7b5cd9e6133a64341f9d11009c0b7ba Mon Sep 17 00:00:00 2001
From: Peter Jung <admin@ptr1337.dev> From: Eric Naim <dnaim@cachyos.org>
Date: Sun, 15 Sep 2024 17:28:27 +0200 Date: Thu, 19 Sep 2024 23:20:21 +0800
Subject: [PATCH 02/11] bbr3 Subject: [PATCH 02/11] bbr3
Signed-off-by: Peter Jung <admin@ptr1337.dev> Signed-off-by: Eric Naim <dnaim@cachyos.org>
--- ---
include/linux/tcp.h | 4 +- include/linux/tcp.h | 4 +-
include/net/inet_connection_sock.h | 4 +- include/net/inet_connection_sock.h | 4 +-
@ -4101,12 +4101,12 @@ index 4d40615dc8fc..f27941201ef2 100644
-- --
2.46.1 2.46.1
From 8f73cbbad2683b2bebffdf85fb133c78e44603a4 Mon Sep 17 00:00:00 2001 From aed1b10d860d25b7b18337ce0043ca2636678e69 Mon Sep 17 00:00:00 2001
From: Peter Jung <admin@ptr1337.dev> From: Eric Naim <dnaim@cachyos.org>
Date: Sun, 15 Sep 2024 17:28:36 +0200 Date: Thu, 19 Sep 2024 23:20:48 +0800
Subject: [PATCH 03/11] block Subject: [PATCH 03/11] block
Signed-off-by: Peter Jung <admin@ptr1337.dev> Signed-off-by: Eric Naim <dnaim@cachyos.org>
--- ---
block/bfq-iosched.c | 120 ++++++++++++++++++++++++++++++++++++-------- block/bfq-iosched.c | 120 ++++++++++++++++++++++++++++++++++++--------
block/bfq-iosched.h | 16 +++++- block/bfq-iosched.h | 16 +++++-
@ -4586,12 +4586,12 @@ index acdc28756d9d..8b214233a061 100644
-- --
2.46.1 2.46.1
From e1cb9da59b75cd677cd7af9923864344099b0973 Mon Sep 17 00:00:00 2001 From 42072fb3b6bd37efebe6085c790a114b394732a1 Mon Sep 17 00:00:00 2001
From: Peter Jung <admin@ptr1337.dev> From: Eric Naim <dnaim@cachyos.org>
Date: Sun, 15 Sep 2024 17:28:46 +0200 Date: Thu, 19 Sep 2024 23:21:02 +0800
Subject: [PATCH 04/11] cachy Subject: [PATCH 04/11] cachy
Signed-off-by: Peter Jung <admin@ptr1337.dev> Signed-off-by: Eric Naim <dnaim@cachyos.org>
--- ---
.../admin-guide/kernel-parameters.txt | 12 + .../admin-guide/kernel-parameters.txt | 12 +
Documentation/admin-guide/sysctl/vm.rst | 72 + Documentation/admin-guide/sysctl/vm.rst | 72 +
@ -11995,19 +11995,20 @@ index 663ce300dd06..f83493838cf9 100644
-- --
2.46.1 2.46.1
From c4201124b983cba28153bd6385dd44b26ffad1e7 Mon Sep 17 00:00:00 2001 From 72728b1ad0206a7eb9048237818eeed6c4a37119 Mon Sep 17 00:00:00 2001
From: Peter Jung <admin@ptr1337.dev> From: Eric Naim <dnaim@cachyos.org>
Date: Sun, 15 Sep 2024 17:28:56 +0200 Date: Thu, 19 Sep 2024 23:21:22 +0800
Subject: [PATCH 05/11] fixes Subject: [PATCH 05/11] fixes
Signed-off-by: Peter Jung <admin@ptr1337.dev> Signed-off-by: Eric Naim <dnaim@cachyos.org>
--- ---
arch/Kconfig | 4 +- arch/Kconfig | 4 +-
arch/x86/include/asm/apic.h | 8 -- arch/x86/include/asm/apic.h | 8 --
arch/x86/kernel/amd_nb.c | 4 + arch/x86/kernel/amd_nb.c | 4 +
arch/x86/kernel/apic/apic_flat_64.c | 119 ++------------------------- arch/x86/kernel/apic/apic_flat_64.c | 119 ++-------------------------
block/elevator.c | 4 +-
drivers/powercap/intel_rapl_common.c | 1 + drivers/powercap/intel_rapl_common.c | 1 +
5 files changed, 14 insertions(+), 122 deletions(-) 6 files changed, 17 insertions(+), 123 deletions(-)
diff --git a/arch/Kconfig b/arch/Kconfig diff --git a/arch/Kconfig b/arch/Kconfig
index 975dd22a2dbd..de69b8f5b5be 100644 index 975dd22a2dbd..de69b8f5b5be 100644
@ -12236,6 +12237,21 @@ index f37ad3392fec..e0308d8c4e6c 100644
-apic_drivers(apic_physflat, apic_flat); -apic_drivers(apic_physflat, apic_flat);
+struct apic *apic __ro_after_init = &apic_physflat; +struct apic *apic __ro_after_init = &apic_physflat;
+EXPORT_SYMBOL_GPL(apic); +EXPORT_SYMBOL_GPL(apic);
diff --git a/block/elevator.c b/block/elevator.c
index 41cf94c3671e..cd630e991eae 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -725,7 +725,9 @@ int elv_iosched_load_module(struct gendisk *disk, const char *buf,
strscpy(elevator_name, buf, sizeof(elevator_name));
- return request_module("%s-iosched", strstrip(elevator_name));
+ request_module("%s-iosched", strstrip(elevator_name));
+
+ return 0;
}
ssize_t elv_iosched_store(struct gendisk *disk, const char *buf,
diff --git a/drivers/powercap/intel_rapl_common.c b/drivers/powercap/intel_rapl_common.c diff --git a/drivers/powercap/intel_rapl_common.c b/drivers/powercap/intel_rapl_common.c
index 3cffa6c79538..8b7a5a31e8c1 100644 index 3cffa6c79538..8b7a5a31e8c1 100644
--- a/drivers/powercap/intel_rapl_common.c --- a/drivers/powercap/intel_rapl_common.c
@ -12251,12 +12267,12 @@ index 3cffa6c79538..8b7a5a31e8c1 100644
-- --
2.46.1 2.46.1
From b24e8834eb51bed12079009ec0ab23b16bc73198 Mon Sep 17 00:00:00 2001 From bcd25ccd10f46e269dd7d9a2217af6a33bf7deaa Mon Sep 17 00:00:00 2001
From: Peter Jung <admin@ptr1337.dev> From: Eric Naim <dnaim@cachyos.org>
Date: Sun, 15 Sep 2024 17:29:06 +0200 Date: Thu, 19 Sep 2024 23:21:44 +0800
Subject: [PATCH 06/11] intel-pstate Subject: [PATCH 06/11] intel-pstate
Signed-off-by: Peter Jung <admin@ptr1337.dev> Signed-off-by: Eric Naim <dnaim@cachyos.org>
--- ---
arch/x86/include/asm/topology.h | 13 ++ arch/x86/include/asm/topology.h | 13 ++
arch/x86/kernel/cpu/aperfmperf.c | 89 +++++++++++- arch/x86/kernel/cpu/aperfmperf.c | 89 +++++++++++-
@ -12735,12 +12751,12 @@ index 7d92f16a430a..86ad1fed71f1 100644
-- --
2.46.1 2.46.1
From 8eb5e816f13a599dd0385bccc1df837664cc7233 Mon Sep 17 00:00:00 2001 From eb003fb17cb5145d650125d3e52db93a6902524c Mon Sep 17 00:00:00 2001
From: Peter Jung <admin@ptr1337.dev> From: Eric Naim <dnaim@cachyos.org>
Date: Sun, 15 Sep 2024 17:29:23 +0200 Date: Thu, 19 Sep 2024 23:22:02 +0800
Subject: [PATCH 07/11] ksm Subject: [PATCH 07/11] ksm
Signed-off-by: Peter Jung <admin@ptr1337.dev> Signed-off-by: Eric Naim <dnaim@cachyos.org>
--- ---
arch/alpha/kernel/syscalls/syscall.tbl | 3 + arch/alpha/kernel/syscalls/syscall.tbl | 3 +
arch/arm/tools/syscall.tbl | 3 + arch/arm/tools/syscall.tbl | 3 +
@ -13177,12 +13193,12 @@ index 01071182763e..7394bad8178e 100644
-- --
2.46.1 2.46.1
From c2703b85f5713426c2ab1e6f25f2364582f053fe Mon Sep 17 00:00:00 2001 From 10e07b6ee168c6d23fbde9e0de127b025f7b1f5c Mon Sep 17 00:00:00 2001
From: Peter Jung <admin@ptr1337.dev> From: Eric Naim <dnaim@cachyos.org>
Date: Sun, 15 Sep 2024 17:29:35 +0200 Date: Thu, 19 Sep 2024 23:22:14 +0800
Subject: [PATCH 08/11] ntsync Subject: [PATCH 08/11] ntsync
Signed-off-by: Peter Jung <admin@ptr1337.dev> Signed-off-by: Eric Naim <dnaim@cachyos.org>
--- ---
Documentation/userspace-api/index.rst | 1 + Documentation/userspace-api/index.rst | 1 +
Documentation/userspace-api/ntsync.rst | 398 +++++ Documentation/userspace-api/ntsync.rst | 398 +++++
@ -16266,12 +16282,12 @@ index 000000000000..5fa2c9a0768c
-- --
2.46.1 2.46.1
From bdd3f4dab12fd8eb06357b2b5593820eb3128651 Mon Sep 17 00:00:00 2001 From 1bf306ae3df8a0f8a4588cf278b01530d1979cd3 Mon Sep 17 00:00:00 2001
From: Peter Jung <admin@ptr1337.dev> From: Eric Naim <dnaim@cachyos.org>
Date: Sun, 15 Sep 2024 17:29:46 +0200 Date: Thu, 19 Sep 2024 23:22:29 +0800
Subject: [PATCH 09/11] perf-per-core Subject: [PATCH 09/11] perf-per-core
Signed-off-by: Peter Jung <admin@ptr1337.dev> Signed-off-by: Eric Naim <dnaim@cachyos.org>
--- ---
Documentation/arch/x86/topology.rst | 4 + Documentation/arch/x86/topology.rst | 4 +
arch/x86/events/rapl.c | 418 ++++++++++++++++++-------- arch/x86/events/rapl.c | 418 ++++++++++++++++++--------
@ -17174,12 +17190,12 @@ index 9a6069e7133c..23722aa21e2f 100644
-- --
2.46.1 2.46.1
From f2a149176007718766b709be8299b005ddd6b158 Mon Sep 17 00:00:00 2001 From 56faa02c031210ff953a42fe996da7c1ff25396a Mon Sep 17 00:00:00 2001
From: Peter Jung <admin@ptr1337.dev> From: Eric Naim <dnaim@cachyos.org>
Date: Sun, 15 Sep 2024 17:30:08 +0200 Date: Thu, 19 Sep 2024 23:23:04 +0800
Subject: [PATCH 10/11] t2 Subject: [PATCH 10/11] t2
Signed-off-by: Peter Jung <admin@ptr1337.dev> Signed-off-by: Eric Naim <dnaim@cachyos.org>
--- ---
.../ABI/testing/sysfs-driver-hid-appletb-kbd | 13 + .../ABI/testing/sysfs-driver-hid-appletb-kbd | 13 +
Documentation/core-api/printk-formats.rst | 32 + Documentation/core-api/printk-formats.rst | 32 +
@ -27589,12 +27605,12 @@ index 4427572b2477..b60c99d61882 100755
-- --
2.46.1 2.46.1
From d312d9b44e2d51dd64ceecf38fccbfbcc8944738 Mon Sep 17 00:00:00 2001 From eedeea376c1cc453dc1d63b13ee1c68e36b1dac1 Mon Sep 17 00:00:00 2001
From: Peter Jung <admin@ptr1337.dev> From: Eric Naim <dnaim@cachyos.org>
Date: Sun, 15 Sep 2024 17:30:16 +0200 Date: Thu, 19 Sep 2024 23:23:17 +0800
Subject: [PATCH 11/11] zstd Subject: [PATCH 11/11] zstd
Signed-off-by: Peter Jung <admin@ptr1337.dev> Signed-off-by: Eric Naim <dnaim@cachyos.org>
--- ---
include/linux/zstd.h | 2 +- include/linux/zstd.h | 2 +-
include/linux/zstd_errors.h | 23 +- include/linux/zstd_errors.h | 23 +-

View File

@ -1,6 +1,6 @@
From 35259c1c06596a086582bb3c63461b039e1e517d Mon Sep 17 00:00:00 2001 From 7b726493e44bba968c8c0369c387b5e462d6840e Mon Sep 17 00:00:00 2001
From: Piotr Gorski <lucjan.lucjanov@gmail.com> From: Piotr Gorski <lucjan.lucjanov@gmail.com>
Date: Fri, 13 Sep 2024 14:15:05 +0200 Date: Mon, 16 Sep 2024 13:24:13 +0200
Subject: [PATCH] bore-cachy-ext Subject: [PATCH] bore-cachy-ext
Signed-off-by: Piotr Gorski <lucjan.lucjanov@gmail.com> Signed-off-by: Piotr Gorski <lucjan.lucjanov@gmail.com>
@ -10,8 +10,8 @@ Signed-off-by: Piotr Gorski <lucjan.lucjanov@gmail.com>
kernel/Kconfig.hz | 16 ++ kernel/Kconfig.hz | 16 ++
kernel/sched/core.c | 141 +++++++++++++++ kernel/sched/core.c | 141 +++++++++++++++
kernel/sched/debug.c | 60 ++++++- kernel/sched/debug.c | 60 ++++++-
kernel/sched/fair.c | 379 +++++++++++++++++++++++++++++++++++++--- kernel/sched/fair.c | 383 +++++++++++++++++++++++++++++++++++++---
kernel/sched/features.h | 20 ++- kernel/sched/features.h | 16 +-
kernel/sched/sched.h | 7 + kernel/sched/sched.h | 7 +
8 files changed, 623 insertions(+), 27 deletions(-) 8 files changed, 623 insertions(+), 27 deletions(-)
@ -91,7 +91,7 @@ index 0f78364ef..b50189ee5 100644
config SCHED_HRTICK config SCHED_HRTICK
def_bool HIGH_RES_TIMERS def_bool HIGH_RES_TIMERS
diff --git a/kernel/sched/core.c b/kernel/sched/core.c diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index c792a6feb..dfb93c5f7 100644 index c792a6feb..79a913e2f 100644
--- a/kernel/sched/core.c --- a/kernel/sched/core.c
+++ b/kernel/sched/core.c +++ b/kernel/sched/core.c
@@ -4336,6 +4336,136 @@ int wake_up_state(struct task_struct *p, unsigned int state) @@ -4336,6 +4336,136 @@ int wake_up_state(struct task_struct *p, unsigned int state)
@ -257,7 +257,7 @@ index c792a6feb..dfb93c5f7 100644
+#ifdef CONFIG_SCHED_BORE +#ifdef CONFIG_SCHED_BORE
+ sched_init_bore(); + sched_init_bore();
+ printk(KERN_INFO "BORE (Burst-Oriented Response Enhancer) CPU Scheduler modification 5.2.11 by Masahito Suzuki"); + printk(KERN_INFO "BORE (Burst-Oriented Response Enhancer) CPU Scheduler modification 5.2.12 by Masahito Suzuki");
+#endif // CONFIG_SCHED_BORE +#endif // CONFIG_SCHED_BORE
+ +
wait_bit_init(); wait_bit_init();
@ -371,7 +371,7 @@ index c057ef46c..3cab39e34 100644
P(se.avg.runnable_sum); P(se.avg.runnable_sum);
P(se.avg.util_sum); P(se.avg.util_sum);
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 2928026d7..f7040962b 100644 index 2928026d7..91a870173 100644
--- a/kernel/sched/fair.c --- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c +++ b/kernel/sched/fair.c
@@ -19,6 +19,9 @@ @@ -19,6 +19,9 @@
@ -384,7 +384,7 @@ index 2928026d7..f7040962b 100644
*/ */
#include <linux/energy_model.h> #include <linux/energy_model.h>
#include <linux/mmap_lock.h> #include <linux/mmap_lock.h>
@@ -64,28 +67,174 @@ @@ -64,28 +67,176 @@
* SCHED_TUNABLESCALING_LOG - scaled logarithmically, *1+ilog(ncpus) * SCHED_TUNABLESCALING_LOG - scaled logarithmically, *1+ilog(ncpus)
* SCHED_TUNABLESCALING_LINEAR - scaled linear, *ncpus * SCHED_TUNABLESCALING_LINEAR - scaled linear, *ncpus
* *
@ -431,6 +431,7 @@ index 2928026d7..f7040962b 100644
+u8 __read_mostly sched_burst_smoothness_long = 1; +u8 __read_mostly sched_burst_smoothness_long = 1;
+u8 __read_mostly sched_burst_smoothness_short = 0; +u8 __read_mostly sched_burst_smoothness_short = 0;
+u8 __read_mostly sched_burst_fork_atavistic = 2; +u8 __read_mostly sched_burst_fork_atavistic = 2;
+u8 __read_mostly sched_burst_parity_threshold = 2;
+u8 __read_mostly sched_burst_penalty_offset = 22; +u8 __read_mostly sched_burst_penalty_offset = 22;
+uint __read_mostly sched_burst_penalty_scale = 1280; +uint __read_mostly sched_burst_penalty_scale = 1280;
+uint __read_mostly sched_burst_cache_lifetime = 60000000; +uint __read_mostly sched_burst_cache_lifetime = 60000000;
@ -439,6 +440,7 @@ index 2928026d7..f7040962b 100644
+uint __read_mostly sched_deadline_preserve_mask = ENQUEUE_RESTORE +uint __read_mostly sched_deadline_preserve_mask = ENQUEUE_RESTORE
+ | ENQUEUE_MIGRATED; + | ENQUEUE_MIGRATED;
+static int __maybe_unused sixty_four = 64; +static int __maybe_unused sixty_four = 64;
+static int __maybe_unused maxval_u8 = 255;
+static int __maybe_unused maxval_12_bits = 4095; +static int __maybe_unused maxval_12_bits = 4095;
+ +
+#define MAX_BURST_PENALTY (39U <<2) +#define MAX_BURST_PENALTY (39U <<2)
@ -570,7 +572,7 @@ index 2928026d7..f7040962b 100644
static int __init setup_sched_thermal_decay_shift(char *str) static int __init setup_sched_thermal_decay_shift(char *str)
{ {
@@ -130,12 +279,8 @@ int __weak arch_asym_cpu_priority(int cpu) @@ -130,12 +281,8 @@ int __weak arch_asym_cpu_priority(int cpu)
* *
* (default: 5 msec, units: microseconds) * (default: 5 msec, units: microseconds)
*/ */
@ -583,7 +585,7 @@ index 2928026d7..f7040962b 100644
#ifdef CONFIG_NUMA_BALANCING #ifdef CONFIG_NUMA_BALANCING
/* Restrict the NUMA promotion throughput (MB/s) for each target node. */ /* Restrict the NUMA promotion throughput (MB/s) for each target node. */
@@ -144,6 +289,92 @@ static unsigned int sysctl_numa_balancing_promote_rate_limit = 65536; @@ -144,6 +291,101 @@ static unsigned int sysctl_numa_balancing_promote_rate_limit = 65536;
#ifdef CONFIG_SYSCTL #ifdef CONFIG_SYSCTL
static struct ctl_table sched_fair_sysctls[] = { static struct ctl_table sched_fair_sysctls[] = {
@ -634,6 +636,15 @@ index 2928026d7..f7040962b 100644
+ .extra2 = SYSCTL_THREE, + .extra2 = SYSCTL_THREE,
+ }, + },
+ { + {
+ .procname = "sched_burst_parity_threshold",
+ .data = &sched_burst_parity_threshold,
+ .maxlen = sizeof(u8),
+ .mode = 0644,
+ .proc_handler = proc_dou8vec_minmax,
+ .extra1 = SYSCTL_ZERO,
+ .extra2 = &maxval_u8,
+ },
+ {
+ .procname = "sched_burst_penalty_offset", + .procname = "sched_burst_penalty_offset",
+ .data = &sched_burst_penalty_offset, + .data = &sched_burst_penalty_offset,
+ .maxlen = sizeof(u8), + .maxlen = sizeof(u8),
@ -676,7 +687,7 @@ index 2928026d7..f7040962b 100644
#ifdef CONFIG_CFS_BANDWIDTH #ifdef CONFIG_CFS_BANDWIDTH
{ {
.procname = "sched_cfs_bandwidth_slice_us", .procname = "sched_cfs_bandwidth_slice_us",
@@ -201,6 +432,13 @@ static inline void update_load_set(struct load_weight *lw, unsigned long w) @@ -201,6 +443,13 @@ static inline void update_load_set(struct load_weight *lw, unsigned long w)
* *
* This idea comes from the SD scheduler of Con Kolivas: * This idea comes from the SD scheduler of Con Kolivas:
*/ */
@ -690,7 +701,7 @@ index 2928026d7..f7040962b 100644
static unsigned int get_update_sysctl_factor(void) static unsigned int get_update_sysctl_factor(void)
{ {
unsigned int cpus = min_t(unsigned int, num_online_cpus(), 8); unsigned int cpus = min_t(unsigned int, num_online_cpus(), 8);
@@ -231,6 +469,7 @@ static void update_sysctl(void) @@ -231,6 +480,7 @@ static void update_sysctl(void)
SET_SYSCTL(sched_base_slice); SET_SYSCTL(sched_base_slice);
#undef SET_SYSCTL #undef SET_SYSCTL
} }
@ -698,7 +709,7 @@ index 2928026d7..f7040962b 100644
void __init sched_init_granularity(void) void __init sched_init_granularity(void)
{ {
@@ -708,6 +947,9 @@ static s64 entity_lag(u64 avruntime, struct sched_entity *se) @@ -708,6 +958,9 @@ static s64 entity_lag(u64 avruntime, struct sched_entity *se)
vlag = avruntime - se->vruntime; vlag = avruntime - se->vruntime;
limit = calc_delta_fair(max_t(u64, 2*se->slice, TICK_NSEC), se); limit = calc_delta_fair(max_t(u64, 2*se->slice, TICK_NSEC), se);
@ -708,7 +719,7 @@ index 2928026d7..f7040962b 100644
return clamp(vlag, -limit, limit); return clamp(vlag, -limit, limit);
} }
@@ -868,6 +1110,39 @@ struct sched_entity *__pick_first_entity(struct cfs_rq *cfs_rq) @@ -868,6 +1121,45 @@ struct sched_entity *__pick_first_entity(struct cfs_rq *cfs_rq)
return __node_2_se(left); return __node_2_se(left);
} }
@ -721,6 +732,12 @@ index 2928026d7..f7040962b 100644
+ if (!curr || !sched_feat(RESPECT_SLICE)) + if (!curr || !sched_feat(RESPECT_SLICE))
+ return false; + return false;
+ +
+#ifdef CONFIG_SCHED_BORE
+ if (likely(sched_bore) && likely(sched_burst_parity_threshold) &&
+ sched_burst_parity_threshold < cfs_rq->nr_running)
+ return false;
+#endif // CONFIG_SCHED_BORE
+
+ /* + /*
+ * Allow preemption at the 0-lag point -- even if not all of the slice + * Allow preemption at the 0-lag point -- even if not all of the slice
+ * is consumed. Note: placement of positive lag can push V left and render + * is consumed. Note: placement of positive lag can push V left and render
@ -748,7 +765,7 @@ index 2928026d7..f7040962b 100644
/* /*
* Earliest Eligible Virtual Deadline First * Earliest Eligible Virtual Deadline First
* *
@@ -887,28 +1162,27 @@ struct sched_entity *__pick_first_entity(struct cfs_rq *cfs_rq) @@ -887,28 +1179,27 @@ struct sched_entity *__pick_first_entity(struct cfs_rq *cfs_rq)
* *
* Which allows tree pruning through eligibility. * Which allows tree pruning through eligibility.
*/ */
@ -784,7 +801,7 @@ index 2928026d7..f7040962b 100644
return curr; return curr;
/* Pick the leftmost entity if it's eligible */ /* Pick the leftmost entity if it's eligible */
@@ -967,6 +1241,7 @@ struct sched_entity *__pick_last_entity(struct cfs_rq *cfs_rq) @@ -967,6 +1258,7 @@ struct sched_entity *__pick_last_entity(struct cfs_rq *cfs_rq)
* Scheduling class statistics methods: * Scheduling class statistics methods:
*/ */
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
@ -792,7 +809,7 @@ index 2928026d7..f7040962b 100644
int sched_update_scaling(void) int sched_update_scaling(void)
{ {
unsigned int factor = get_update_sysctl_factor(); unsigned int factor = get_update_sysctl_factor();
@@ -978,6 +1253,7 @@ int sched_update_scaling(void) @@ -978,6 +1270,7 @@ int sched_update_scaling(void)
return 0; return 0;
} }
@ -800,7 +817,7 @@ index 2928026d7..f7040962b 100644
#endif #endif
#endif #endif
@@ -1178,6 +1454,10 @@ static void update_curr(struct cfs_rq *cfs_rq) @@ -1178,6 +1471,10 @@ static void update_curr(struct cfs_rq *cfs_rq)
if (unlikely(delta_exec <= 0)) if (unlikely(delta_exec <= 0))
return; return;
@ -811,7 +828,7 @@ index 2928026d7..f7040962b 100644
curr->vruntime += calc_delta_fair(delta_exec, curr); curr->vruntime += calc_delta_fair(delta_exec, curr);
update_deadline(cfs_rq, curr); update_deadline(cfs_rq, curr);
update_min_vruntime(cfs_rq); update_min_vruntime(cfs_rq);
@@ -5193,6 +5473,12 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) @@ -5193,6 +5490,12 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)
s64 lag = 0; s64 lag = 0;
se->slice = sysctl_sched_base_slice; se->slice = sysctl_sched_base_slice;
@ -824,7 +841,7 @@ index 2928026d7..f7040962b 100644
vslice = calc_delta_fair(se->slice, se); vslice = calc_delta_fair(se->slice, se);
/* /*
@@ -5203,6 +5489,9 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) @@ -5203,6 +5506,9 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)
* *
* EEVDF: placement strategy #1 / #2 * EEVDF: placement strategy #1 / #2
*/ */
@ -834,7 +851,7 @@ index 2928026d7..f7040962b 100644
if (sched_feat(PLACE_LAG) && cfs_rq->nr_running) { if (sched_feat(PLACE_LAG) && cfs_rq->nr_running) {
struct sched_entity *curr = cfs_rq->curr; struct sched_entity *curr = cfs_rq->curr;
unsigned long load; unsigned long load;
@@ -5278,6 +5567,13 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) @@ -5278,6 +5584,13 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)
* on average, halfway through their slice, as such start tasks * on average, halfway through their slice, as such start tasks
* off with half a slice to ease into the competition. * off with half a slice to ease into the competition.
*/ */
@ -848,7 +865,7 @@ index 2928026d7..f7040962b 100644
if (sched_feat(PLACE_DEADLINE_INITIAL) && (flags & ENQUEUE_INITIAL)) if (sched_feat(PLACE_DEADLINE_INITIAL) && (flags & ENQUEUE_INITIAL))
vslice /= 2; vslice /= 2;
@@ -5492,7 +5788,7 @@ pick_next_entity(struct cfs_rq *cfs_rq) @@ -5492,7 +5805,7 @@ pick_next_entity(struct cfs_rq *cfs_rq)
cfs_rq->next && entity_eligible(cfs_rq, cfs_rq->next)) cfs_rq->next && entity_eligible(cfs_rq, cfs_rq->next))
return cfs_rq->next; return cfs_rq->next;
@ -857,7 +874,7 @@ index 2928026d7..f7040962b 100644
} }
static bool check_cfs_rq_runtime(struct cfs_rq *cfs_rq); static bool check_cfs_rq_runtime(struct cfs_rq *cfs_rq);
@@ -6860,6 +7156,14 @@ static void dequeue_task_fair(struct rq *rq, struct task_struct *p, int flags) @@ -6860,6 +7173,14 @@ static void dequeue_task_fair(struct rq *rq, struct task_struct *p, int flags)
bool was_sched_idle = sched_idle_rq(rq); bool was_sched_idle = sched_idle_rq(rq);
util_est_dequeue(&rq->cfs, p); util_est_dequeue(&rq->cfs, p);
@ -872,7 +889,7 @@ index 2928026d7..f7040962b 100644
for_each_sched_entity(se) { for_each_sched_entity(se) {
cfs_rq = cfs_rq_of(se); cfs_rq = cfs_rq_of(se);
@@ -8428,7 +8732,7 @@ static void check_preempt_wakeup_fair(struct rq *rq, struct task_struct *p, int @@ -8428,7 +8749,7 @@ static void check_preempt_wakeup_fair(struct rq *rq, struct task_struct *p, int
/* /*
* XXX pick_eevdf(cfs_rq) != se ? * XXX pick_eevdf(cfs_rq) != se ?
*/ */
@ -881,7 +898,7 @@ index 2928026d7..f7040962b 100644
goto preempt; goto preempt;
return; return;
@@ -8646,16 +8950,25 @@ static void yield_task_fair(struct rq *rq) @@ -8646,16 +8967,25 @@ static void yield_task_fair(struct rq *rq)
/* /*
* Are we the only task in the tree? * Are we the only task in the tree?
*/ */
@ -907,7 +924,7 @@ index 2928026d7..f7040962b 100644
/* /*
* Tell update_rq_clock() that we've just updated, * Tell update_rq_clock() that we've just updated,
* so we don't do microscopic update in schedule() * so we don't do microscopic update in schedule()
@@ -12720,6 +13033,9 @@ static void task_fork_fair(struct task_struct *p) @@ -12720,6 +13050,9 @@ static void task_fork_fair(struct task_struct *p)
curr = cfs_rq->curr; curr = cfs_rq->curr;
if (curr) if (curr)
update_curr(cfs_rq); update_curr(cfs_rq);
@ -917,28 +934,11 @@ index 2928026d7..f7040962b 100644
place_entity(cfs_rq, se, ENQUEUE_INITIAL); place_entity(cfs_rq, se, ENQUEUE_INITIAL);
rq_unlock(rq, &rf); rq_unlock(rq, &rf);
} }
@@ -13303,3 +13619,16 @@ __init void init_sched_fair_class(void)
#endif /* SMP */
}
+
+#ifdef CONFIG_SCHED_BORE
+void reweight_task(struct task_struct *p, int prio)
+{
+ struct sched_entity *se = &p->se;
+ struct cfs_rq *cfs_rq = cfs_rq_of(se);
+ struct load_weight *load = &se->load;
+ unsigned long weight = scale_load(sched_prio_to_weight[prio]);
+
+ reweight_entity(cfs_rq, se, weight);
+ load->inv_weight = sched_prio_to_wmult[prio];
+}
+#endif // CONFIG_SCHED_BORE
diff --git a/kernel/sched/features.h b/kernel/sched/features.h diff --git a/kernel/sched/features.h b/kernel/sched/features.h
index 143f55df8..bfeb9f653 100644 index 143f55df8..09599a67c 100644
--- a/kernel/sched/features.h --- a/kernel/sched/features.h
+++ b/kernel/sched/features.h +++ b/kernel/sched/features.h
@@ -5,8 +5,26 @@ @@ -5,8 +5,22 @@
* sleep+wake cycles. EEVDF placement strategy #1, #2 if disabled. * sleep+wake cycles. EEVDF placement strategy #1, #2 if disabled.
*/ */
SCHED_FEAT(PLACE_LAG, true) SCHED_FEAT(PLACE_LAG, true)
@ -950,11 +950,7 @@ index 143f55df8..bfeb9f653 100644
+/* +/*
+ * Inhibit (wakeup) preemption until the current task has exhausted its slice. + * Inhibit (wakeup) preemption until the current task has exhausted its slice.
+ */ + */
+#ifdef CONFIG_SCHED_BORE
+SCHED_FEAT(RESPECT_SLICE, false)
+#else // !CONFIG_SCHED_BORE
+SCHED_FEAT(RESPECT_SLICE, true) +SCHED_FEAT(RESPECT_SLICE, true)
+#endif // CONFIG_SCHED_BORE
+/* +/*
+ * Relax RESPECT_SLICE to allow preemption once current has reached 0-lag. + * Relax RESPECT_SLICE to allow preemption once current has reached 0-lag.
+ */ + */

View File

@ -28,6 +28,8 @@ scripts/config -m NET_SCH_FQ_CODEL \
-e DEFAULT_FQ \ -e DEFAULT_FQ \
--set-str DEFAULT_NET_SCH fq --set-str DEFAULT_NET_SCH fq
scripts/config -e SCHED_CLASS_EXT
scripts/config -e LRU_GEN -e LRU_GEN_ENABLED -d LRU_GEN_STATS scripts/config -e LRU_GEN -e LRU_GEN_ENABLED -d LRU_GEN_STATS
scripts/config -d TRANSPARENT_HUGEPAGE_MADVISE -e TRANSPARENT_HUGEPAGE_ALWAYS scripts/config -d TRANSPARENT_HUGEPAGE_MADVISE -e TRANSPARENT_HUGEPAGE_ALWAYS