From ac1b61d8bdbe869f510d6c86ccb679797cf27db4 Mon Sep 17 00:00:00 2001 From: ferrreo Date: Tue, 22 Aug 2023 18:16:01 +0100 Subject: [PATCH] 6.5 RC7 --- config | 10 +- patches/0001-cachy-all.patch | 1022 ++++++++++++++++++++++++++++------ patches/0002-eevdf.patch | 178 +++--- patches/0002-eevdfbore.patch | 226 ++++---- patches/0006-AMD-cppc.patch | 573 ------------------- scripts/patch.sh | 4 +- 6 files changed, 1054 insertions(+), 959 deletions(-) delete mode 100644 patches/0006-AMD-cppc.patch diff --git a/config b/config index 949e0aa..6c60e62 100644 --- a/config +++ b/config @@ -1,15 +1,15 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/x86 6.5.0-rc1 Kernel Configuration +# Linux/x86 6.5.0-rc7 Kernel Configuration # -CONFIG_CC_VERSION_TEXT="gcc (GCC) 13.1.1 20230525" +CONFIG_CC_VERSION_TEXT="gcc (GCC) 13.2.1 20230730" CONFIG_CC_IS_GCC=y -CONFIG_GCC_VERSION=130101 +CONFIG_GCC_VERSION=130201 CONFIG_CLANG_VERSION=0 CONFIG_AS_IS_GNU=y -CONFIG_AS_VERSION=24000 +CONFIG_AS_VERSION=24100 CONFIG_LD_IS_BFD=y -CONFIG_LD_VERSION=24000 +CONFIG_LD_VERSION=24100 CONFIG_LLD_VERSION=0 CONFIG_RUST_IS_AVAILABLE=y CONFIG_CC_CAN_LINK=y diff --git a/patches/0001-cachy-all.patch b/patches/0001-cachy-all.patch index 480912c..2903879 100644 --- a/patches/0001-cachy-all.patch +++ b/patches/0001-cachy-all.patch @@ -1,7 +1,664 @@ -From 907edd508b99c761190492fb3f2211443b4e9bb3 Mon Sep 17 00:00:00 2001 +From a7ef8b1848b3d53522882d36ef91ba3a6fcc619c Mon Sep 17 00:00:00 2001 From: Peter Jung -Date: Mon, 31 Jul 2023 12:19:09 +0200 -Subject: [PATCH 1/5] bbr3 +Date: Sun, 20 Aug 2023 15:52:45 +0200 +Subject: [PATCH 1/6] amd-pref-core + +Signed-off-by: Peter Jung +--- + .../admin-guide/kernel-parameters.txt | 5 + + Documentation/admin-guide/pm/amd-pstate.rst | 54 +++++++ + arch/x86/Kconfig | 3 +- + drivers/acpi/cppc_acpi.c | 13 ++ + drivers/acpi/processor_driver.c | 6 + + drivers/cpufreq/amd-pstate-ut.c | 50 +++--- + drivers/cpufreq/amd-pstate.c | 152 ++++++++++++++++-- + drivers/cpufreq/cpufreq.c | 13 ++ + include/acpi/cppc_acpi.h | 5 + + include/linux/amd-pstate.h | 1 + + include/linux/cpufreq.h | 4 + + 11 files changed, 259 insertions(+), 47 deletions(-) + +diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt +index 722b6eca2e938..ac95d4c9666e4 100644 +--- a/Documentation/admin-guide/kernel-parameters.txt ++++ b/Documentation/admin-guide/kernel-parameters.txt +@@ -363,6 +363,11 @@ + selects a performance level in this range and appropriate + to the current workload. + ++ amd_prefcore= ++ [X86] ++ disable ++ Disable AMD Pstate Preferred Core. ++ + amijoy.map= [HW,JOY] Amiga joystick support + Map of devices attached to JOY0DAT and JOY1DAT + Format: , +diff --git a/Documentation/admin-guide/pm/amd-pstate.rst b/Documentation/admin-guide/pm/amd-pstate.rst +index 1cf40f69278cd..ef2b69935311f 100644 +--- a/Documentation/admin-guide/pm/amd-pstate.rst ++++ b/Documentation/admin-guide/pm/amd-pstate.rst +@@ -353,6 +353,48 @@ is activated. In this mode, driver requests minimum and maximum performance + level and the platform autonomously selects a performance level in this range + and appropriate to the current workload. + ++AMD Pstate Preferred Core ++================================= ++ ++The core frequency is subjected to the process variation in semiconductors. ++Not all cores are able to reach the maximum frequency respecting the ++infrastructure limits. Consequently, AMD has redefined the concept of ++maximum frequency of a part. This means that a fraction of cores can reach ++maximum frequency. To find the best process scheduling policy for a given ++scenario, OS needs to know the core ordering informed by the platform through ++highest performance capability register of the CPPC interface. ++ ++``AMD Pstate Preferred Core`` enable the scheduler to favor scheduling on cores ++can be get a higher frequency with lower voltage under preferred core. ++And it has the ability to dynamically change the preferred core based on the ++workload and platform conditions and accounting for thermals and aging. ++ ++The priority metric will be initialized by the AMD Pstate driver. The AMD Pstate ++driver will also determine whether or not ``AMD Pstate Preferred Core`` is ++supported by the platform. ++ ++AMD Pstate driver will provide an initial core ordering when the system boots. ++The platform uses the CPPC interfaces to communicate the core ranking to the ++operating system and scheduler to make sure that OS is choosing the cores ++with highest performance firstly for scheduling the process. When AMD Pstate ++driver receives a message with the highest performance change, it will ++update the core ranking and set the cpu's priority. ++ ++AMD Preferred Core Switch ++================================= ++Kernel Parameters ++----------------- ++ ++``AMD Pstate Preferred Core`` has two states: enable and disable. ++Enable/disable states can be chosen by different kernel parameters. ++Default enable ``AMD Pstate Preferred Core``. ++ ++``amd_prefcore=disable`` ++ ++If ``amd_prefcore=disable`` is passed to kernel command line option ++then disable ``AMD Pstate Preferred Core`` if platform can support ++the Preferred Core feature. ++ + User Space Interface in ``sysfs`` - General + =========================================== + +@@ -385,6 +427,18 @@ control its functionality at the system level. They are located in the + to the operation mode represented by that string - or to be + unregistered in the "disable" case. + ++``prefcore`` ++ Preferred Core state of the driver: "enabled" or "disabled". ++ ++ "enabled" ++ Enable the AMD Preferred Core. ++ ++ "disabled" ++ Disable the AMD Preferred Core ++ ++ ++ This attribute is read-only to check the state of Preferred Core. ++ + ``cpupower`` tool support for ``amd-pstate`` + =============================================== + +diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig +index e36261b4ea14f..03322d2840faa 100644 +--- a/arch/x86/Kconfig ++++ b/arch/x86/Kconfig +@@ -1052,8 +1052,9 @@ config SCHED_MC + + config SCHED_MC_PRIO + bool "CPU core priorities scheduler support" +- depends on SCHED_MC && CPU_SUP_INTEL ++ depends on SCHED_MC + select X86_INTEL_PSTATE ++ select X86_AMD_PSTATE + select CPU_FREQ + default y + help +diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c +index 7ff269a78c208..ad388a0e84842 100644 +--- a/drivers/acpi/cppc_acpi.c ++++ b/drivers/acpi/cppc_acpi.c +@@ -1154,6 +1154,19 @@ int cppc_get_nominal_perf(int cpunum, u64 *nominal_perf) + return cppc_get_perf(cpunum, NOMINAL_PERF, nominal_perf); + } + ++/** ++ * cppc_get_highest_perf - Get the highest performance register value. ++ * @cpunum: CPU from which to get highest performance. ++ * @highest_perf: Return address. ++ * ++ * Return: 0 for success, -EIO otherwise. ++ */ ++int cppc_get_highest_perf(int cpunum, u64 *highest_perf) ++{ ++ return cppc_get_perf(cpunum, HIGHEST_PERF, highest_perf); ++} ++EXPORT_SYMBOL_GPL(cppc_get_highest_perf); ++ + /** + * cppc_get_epp_perf - Get the epp register value. + * @cpunum: CPU from which to get epp preference value. +diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c +index 4bd16b3f07814..29b2fb68a35db 100644 +--- a/drivers/acpi/processor_driver.c ++++ b/drivers/acpi/processor_driver.c +@@ -27,6 +27,7 @@ + #define ACPI_PROCESSOR_NOTIFY_PERFORMANCE 0x80 + #define ACPI_PROCESSOR_NOTIFY_POWER 0x81 + #define ACPI_PROCESSOR_NOTIFY_THROTTLING 0x82 ++#define ACPI_PROCESSOR_NOTIFY_HIGEST_PERF_CHANGED 0x85 + + MODULE_AUTHOR("Paul Diefenbaugh"); + MODULE_DESCRIPTION("ACPI Processor Driver"); +@@ -83,6 +84,11 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data) + acpi_bus_generate_netlink_event(device->pnp.device_class, + dev_name(&device->dev), event, 0); + break; ++ case ACPI_PROCESSOR_NOTIFY_HIGEST_PERF_CHANGED: ++ cpufreq_update_highest_perf(pr->id); ++ acpi_bus_generate_netlink_event(device->pnp.device_class, ++ dev_name(&device->dev), event, 0); ++ break; + default: + acpi_handle_debug(handle, "Unsupported event [0x%x]\n", event); + break; +diff --git a/drivers/cpufreq/amd-pstate-ut.c b/drivers/cpufreq/amd-pstate-ut.c +index 7f3fe20489818..f04ae67dda372 100644 +--- a/drivers/cpufreq/amd-pstate-ut.c ++++ b/drivers/cpufreq/amd-pstate-ut.c +@@ -64,27 +64,9 @@ static struct amd_pstate_ut_struct amd_pstate_ut_cases[] = { + static bool get_shared_mem(void) + { + bool result = false; +- char path[] = "/sys/module/amd_pstate/parameters/shared_mem"; +- char buf[5] = {0}; +- struct file *filp = NULL; +- loff_t pos = 0; +- ssize_t ret; +- +- if (!boot_cpu_has(X86_FEATURE_CPPC)) { +- filp = filp_open(path, O_RDONLY, 0); +- if (IS_ERR(filp)) +- pr_err("%s unable to open %s file!\n", __func__, path); +- else { +- ret = kernel_read(filp, &buf, sizeof(buf), &pos); +- if (ret < 0) +- pr_err("%s read %s file fail ret=%ld!\n", +- __func__, path, (long)ret); +- filp_close(filp, NULL); +- } + +- if ('Y' == *buf) +- result = true; +- } ++ if (!boot_cpu_has(X86_FEATURE_CPPC)) ++ result = true; + + return result; + } +@@ -145,8 +127,6 @@ static void amd_pstate_ut_check_perf(u32 index) + struct cpufreq_policy *policy = NULL; + struct amd_cpudata *cpudata = NULL; + +- highest_perf = amd_get_highest_perf(); +- + for_each_possible_cpu(cpu) { + policy = cpufreq_cpu_get(cpu); + if (!policy) +@@ -158,9 +138,10 @@ static void amd_pstate_ut_check_perf(u32 index) + if (ret) { + amd_pstate_ut_cases[index].result = AMD_PSTATE_UT_RESULT_FAIL; + pr_err("%s cppc_get_perf_caps ret=%d error!\n", __func__, ret); +- return; ++ goto skip_test; + } + ++ highest_perf = cppc_perf.highest_perf; + nominal_perf = cppc_perf.nominal_perf; + lowest_nonlinear_perf = cppc_perf.lowest_nonlinear_perf; + lowest_perf = cppc_perf.lowest_perf; +@@ -169,9 +150,10 @@ static void amd_pstate_ut_check_perf(u32 index) + if (ret) { + amd_pstate_ut_cases[index].result = AMD_PSTATE_UT_RESULT_FAIL; + pr_err("%s read CPPC_CAP1 ret=%d error!\n", __func__, ret); +- return; ++ goto skip_test; + } + ++ highest_perf = AMD_CPPC_HIGHEST_PERF(cap1); + nominal_perf = AMD_CPPC_NOMINAL_PERF(cap1); + lowest_nonlinear_perf = AMD_CPPC_LOWNONLIN_PERF(cap1); + lowest_perf = AMD_CPPC_LOWEST_PERF(cap1); +@@ -187,7 +169,7 @@ static void amd_pstate_ut_check_perf(u32 index) + nominal_perf, cpudata->nominal_perf, + lowest_nonlinear_perf, cpudata->lowest_nonlinear_perf, + lowest_perf, cpudata->lowest_perf); +- return; ++ goto skip_test; + } + + if (!((highest_perf >= nominal_perf) && +@@ -198,11 +180,15 @@ static void amd_pstate_ut_check_perf(u32 index) + pr_err("%s cpu%d highest=%d >= nominal=%d > lowest_nonlinear=%d > lowest=%d > 0, the formula is incorrect!\n", + __func__, cpu, highest_perf, nominal_perf, + lowest_nonlinear_perf, lowest_perf); +- return; ++ goto skip_test; + } ++ cpufreq_cpu_put(policy); + } + + amd_pstate_ut_cases[index].result = AMD_PSTATE_UT_RESULT_PASS; ++ return; ++skip_test: ++ cpufreq_cpu_put(policy); + } + + /* +@@ -230,14 +216,14 @@ static void amd_pstate_ut_check_freq(u32 index) + pr_err("%s cpu%d max=%d >= nominal=%d > lowest_nonlinear=%d > min=%d > 0, the formula is incorrect!\n", + __func__, cpu, cpudata->max_freq, cpudata->nominal_freq, + cpudata->lowest_nonlinear_freq, cpudata->min_freq); +- return; ++ goto skip_test; + } + + if (cpudata->min_freq != policy->min) { + amd_pstate_ut_cases[index].result = AMD_PSTATE_UT_RESULT_FAIL; + pr_err("%s cpu%d cpudata_min_freq=%d policy_min=%d, they should be equal!\n", + __func__, cpu, cpudata->min_freq, policy->min); +- return; ++ goto skip_test; + } + + if (cpudata->boost_supported) { +@@ -249,16 +235,20 @@ static void amd_pstate_ut_check_freq(u32 index) + pr_err("%s cpu%d policy_max=%d should be equal cpu_max=%d or cpu_nominal=%d !\n", + __func__, cpu, policy->max, cpudata->max_freq, + cpudata->nominal_freq); +- return; ++ goto skip_test; + } + } else { + amd_pstate_ut_cases[index].result = AMD_PSTATE_UT_RESULT_FAIL; + pr_err("%s cpu%d must support boost!\n", __func__, cpu); +- return; ++ goto skip_test; + } ++ cpufreq_cpu_put(policy); + } + + amd_pstate_ut_cases[index].result = AMD_PSTATE_UT_RESULT_PASS; ++ return; ++skip_test: ++ cpufreq_cpu_put(policy); + } + + static int __init amd_pstate_ut_init(void) +diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c +index 9a1e194d5cf88..8a8e4ecb1b5c6 100644 +--- a/drivers/cpufreq/amd-pstate.c ++++ b/drivers/cpufreq/amd-pstate.c +@@ -37,6 +37,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -49,6 +50,8 @@ + + #define AMD_PSTATE_TRANSITION_LATENCY 20000 + #define AMD_PSTATE_TRANSITION_DELAY 1000 ++#define AMD_PSTATE_PREFCORE_THRESHOLD 166 ++#define AMD_PSTATE_MAX_CPPC_PERF 255 + + /* + * TODO: We need more time to fine tune processors with shared memory solution +@@ -65,6 +68,9 @@ static struct cpufreq_driver amd_pstate_epp_driver; + static int cppc_state = AMD_PSTATE_UNDEFINED; + static bool cppc_enabled; + ++/*Preferred Core featue is supported*/ ++static bool prefcore = true; ++ + /* + * AMD Energy Preference Performance (EPP) + * The EPP is used in the CCLK DPM controller to drive +@@ -290,27 +296,26 @@ static inline int amd_pstate_enable(bool enable) + static int pstate_init_perf(struct amd_cpudata *cpudata) + { + u64 cap1; +- u32 highest_perf; + + int ret = rdmsrl_safe_on_cpu(cpudata->cpu, MSR_AMD_CPPC_CAP1, + &cap1); + if (ret) + return ret; + +- /* +- * TODO: Introduce AMD specific power feature. +- * +- * CPPC entry doesn't indicate the highest performance in some ASICs. ++ /* For platforms that do not support the preferred core feature, the ++ * highest_pef may be configured with 166 or 255, to avoid max frequency ++ * calculated wrongly. we take the AMD_CPPC_HIGHEST_PERF(cap1) value as ++ * the default max perf. + */ +- highest_perf = amd_get_highest_perf(); +- if (highest_perf > AMD_CPPC_HIGHEST_PERF(cap1)) +- highest_perf = AMD_CPPC_HIGHEST_PERF(cap1); +- +- WRITE_ONCE(cpudata->highest_perf, highest_perf); ++ if (prefcore) ++ WRITE_ONCE(cpudata->highest_perf, AMD_PSTATE_PREFCORE_THRESHOLD); ++ else ++ WRITE_ONCE(cpudata->highest_perf, AMD_CPPC_HIGHEST_PERF(cap1)); + + WRITE_ONCE(cpudata->nominal_perf, AMD_CPPC_NOMINAL_PERF(cap1)); + WRITE_ONCE(cpudata->lowest_nonlinear_perf, AMD_CPPC_LOWNONLIN_PERF(cap1)); + WRITE_ONCE(cpudata->lowest_perf, AMD_CPPC_LOWEST_PERF(cap1)); ++ WRITE_ONCE(cpudata->prefcore_highest_perf, AMD_CPPC_HIGHEST_PERF(cap1)); + + return 0; + } +@@ -318,22 +323,21 @@ static int pstate_init_perf(struct amd_cpudata *cpudata) + static int cppc_init_perf(struct amd_cpudata *cpudata) + { + struct cppc_perf_caps cppc_perf; +- u32 highest_perf; + + int ret = cppc_get_perf_caps(cpudata->cpu, &cppc_perf); + if (ret) + return ret; + +- highest_perf = amd_get_highest_perf(); +- if (highest_perf > cppc_perf.highest_perf) +- highest_perf = cppc_perf.highest_perf; +- +- WRITE_ONCE(cpudata->highest_perf, highest_perf); ++ if (prefcore) ++ WRITE_ONCE(cpudata->highest_perf, AMD_PSTATE_PREFCORE_THRESHOLD); ++ else ++ WRITE_ONCE(cpudata->highest_perf, cppc_perf.highest_perf); + + WRITE_ONCE(cpudata->nominal_perf, cppc_perf.nominal_perf); + WRITE_ONCE(cpudata->lowest_nonlinear_perf, + cppc_perf.lowest_nonlinear_perf); + WRITE_ONCE(cpudata->lowest_perf, cppc_perf.lowest_perf); ++ WRITE_ONCE(cpudata->prefcore_highest_perf, cppc_perf.highest_perf); + + if (cppc_state == AMD_PSTATE_ACTIVE) + return 0; +@@ -676,6 +680,100 @@ static void amd_perf_ctl_reset(unsigned int cpu) + wrmsrl_on_cpu(cpu, MSR_AMD_PERF_CTL, 0); + } + ++/* ++ * Set AMD Pstate Preferred Core enable can't be done directly from cpufreq callbacks ++ * due to locking, so queue the work for later. ++ */ ++static void amd_pstste_sched_prefcore_workfn(struct work_struct *work) ++{ ++ sched_set_itmt_support(); ++} ++static DECLARE_WORK(sched_prefcore_work, amd_pstste_sched_prefcore_workfn); ++ ++/** ++ * Get the highest performance register value. ++ * @cpu: CPU from which to get highest performance. ++ * @highest_perf: Return address. ++ * ++ * Return: 0 for success, -EIO otherwise. ++ */ ++static int amd_pstate_get_highest_perf(int cpu, u64 *highest_perf) ++{ ++ int ret; ++ ++ if (boot_cpu_has(X86_FEATURE_CPPC)) { ++ u64 cap1; ++ ++ ret = rdmsrl_safe_on_cpu(cpu, MSR_AMD_CPPC_CAP1, &cap1); ++ if (ret) ++ return ret; ++ WRITE_ONCE(*highest_perf, AMD_CPPC_HIGHEST_PERF(cap1)); ++ } else { ++ ret = cppc_get_highest_perf(cpu, highest_perf); ++ } ++ ++ return (ret); ++} ++ ++static void amd_pstate_init_prefcore(void) ++{ ++ int cpu, ret; ++ u64 highest_perf; ++ ++ if (!prefcore) ++ return; ++ ++ for_each_online_cpu(cpu) { ++ ret = amd_pstate_get_highest_perf(cpu, &highest_perf); ++ if (ret) ++ break; ++ ++ sched_set_itmt_core_prio(highest_perf, cpu); ++ ++ /* check if CPPC preferred core feature is enabled*/ ++ if (highest_perf == AMD_PSTATE_MAX_CPPC_PERF) { ++ prefcore = false; ++ return; ++ } ++ } ++ ++ /* ++ * This code can be run during CPU online under the ++ * CPU hotplug locks, so sched_set_amd_prefcore_support() ++ * cannot be called from here. Queue up a work item ++ * to invoke it. ++ */ ++ schedule_work(&sched_prefcore_work); ++} ++ ++static void amd_pstate_update_highest_perf(unsigned int cpu) ++{ ++ struct cpufreq_policy *policy; ++ struct amd_cpudata *cpudata; ++ u32 prev_high = 0, cur_high = 0; ++ u64 highest_perf; ++ int ret; ++ ++ if (!prefcore) ++ return; ++ ++ ret = amd_pstate_get_highest_perf(cpu, &highest_perf); ++ if (ret) ++ return; ++ ++ policy = cpufreq_cpu_get(cpu); ++ cpudata = policy->driver_data; ++ cur_high = highest_perf; ++ prev_high = READ_ONCE(cpudata->prefcore_highest_perf); ++ ++ if (prev_high != cur_high) { ++ WRITE_ONCE(cpudata->prefcore_highest_perf, cur_high); ++ sched_set_itmt_core_prio(cur_high, cpu); ++ } ++ ++ cpufreq_cpu_put(policy); ++} ++ + static int amd_pstate_cpu_init(struct cpufreq_policy *policy) + { + int min_freq, max_freq, nominal_freq, lowest_nonlinear_freq, ret; +@@ -1037,6 +1135,12 @@ static ssize_t status_store(struct device *a, struct device_attribute *b, + return ret < 0 ? ret : count; + } + ++static ssize_t prefcore_show(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ return sysfs_emit(buf, "%s\n", prefcore ? "enabled" : "disabled"); ++} ++ + cpufreq_freq_attr_ro(amd_pstate_max_freq); + cpufreq_freq_attr_ro(amd_pstate_lowest_nonlinear_freq); + +@@ -1044,6 +1148,7 @@ cpufreq_freq_attr_ro(amd_pstate_highest_perf); + cpufreq_freq_attr_rw(energy_performance_preference); + cpufreq_freq_attr_ro(energy_performance_available_preferences); + static DEVICE_ATTR_RW(status); ++static DEVICE_ATTR_RO(prefcore); + + static struct freq_attr *amd_pstate_attr[] = { + &amd_pstate_max_freq, +@@ -1063,6 +1168,7 @@ static struct freq_attr *amd_pstate_epp_attr[] = { + + static struct attribute *pstate_global_attributes[] = { + &dev_attr_status.attr, ++ &dev_attr_prefcore.attr, + NULL + }; + +@@ -1392,6 +1498,7 @@ static struct cpufreq_driver amd_pstate_driver = { + .suspend = amd_pstate_cpu_suspend, + .resume = amd_pstate_cpu_resume, + .set_boost = amd_pstate_set_boost, ++ .update_highest_perf = amd_pstate_update_highest_perf, + .name = "amd-pstate", + .attr = amd_pstate_attr, + }; +@@ -1406,6 +1513,7 @@ static struct cpufreq_driver amd_pstate_epp_driver = { + .online = amd_pstate_epp_cpu_online, + .suspend = amd_pstate_epp_suspend, + .resume = amd_pstate_epp_resume, ++ .update_highest_perf = amd_pstate_update_highest_perf, + .name = "amd-pstate-epp", + .attr = amd_pstate_epp_attr, + }; +@@ -1506,6 +1614,8 @@ static int __init amd_pstate_init(void) + } + } + ++ amd_pstate_init_prefcore(); ++ + return ret; + + global_attr_free: +@@ -1527,7 +1637,17 @@ static int __init amd_pstate_param(char *str) + + return amd_pstate_set_driver(mode_idx); + } ++ ++static int __init amd_prefcore_param(char *str) ++{ ++ if (!strcmp(str, "disable")) ++ prefcore = false; ++ ++ return 0; ++} ++ + early_param("amd_pstate", amd_pstate_param); ++early_param("amd_prefcore", amd_prefcore_param); + + MODULE_AUTHOR("Huang Rui "); + MODULE_DESCRIPTION("AMD Processor P-state Frequency Driver"); +diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c +index 50bbc969ffe53..842357abfae60 100644 +--- a/drivers/cpufreq/cpufreq.c ++++ b/drivers/cpufreq/cpufreq.c +@@ -2675,6 +2675,19 @@ void cpufreq_update_limits(unsigned int cpu) + } + EXPORT_SYMBOL_GPL(cpufreq_update_limits); + ++/** ++ * cpufreq_update_highest_perf - Update highest performance for a given CPU. ++ * @cpu: CPU to update the highest performance for. ++ * ++ * Invoke the driver's ->update_highest_perf callback if present ++ */ ++void cpufreq_update_highest_perf(unsigned int cpu) ++{ ++ if (cpufreq_driver->update_highest_perf) ++ cpufreq_driver->update_highest_perf(cpu); ++} ++EXPORT_SYMBOL_GPL(cpufreq_update_highest_perf); ++ + /********************************************************************* + * BOOST * + *********************************************************************/ +diff --git a/include/acpi/cppc_acpi.h b/include/acpi/cppc_acpi.h +index 6126c977ece04..c0b69ffe7bdb4 100644 +--- a/include/acpi/cppc_acpi.h ++++ b/include/acpi/cppc_acpi.h +@@ -139,6 +139,7 @@ struct cppc_cpudata { + #ifdef CONFIG_ACPI_CPPC_LIB + extern int cppc_get_desired_perf(int cpunum, u64 *desired_perf); + extern int cppc_get_nominal_perf(int cpunum, u64 *nominal_perf); ++extern int cppc_get_highest_perf(int cpunum, u64 *highest_perf); + extern int cppc_get_perf_ctrs(int cpu, struct cppc_perf_fb_ctrs *perf_fb_ctrs); + extern int cppc_set_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls); + extern int cppc_set_enable(int cpu, bool enable); +@@ -165,6 +166,10 @@ static inline int cppc_get_nominal_perf(int cpunum, u64 *nominal_perf) + { + return -ENOTSUPP; + } ++static inline int cppc_get_highest_perf(int cpunum, u64 *highest_perf) ++{ ++ return -ENOTSUPP; ++} + static inline int cppc_get_perf_ctrs(int cpu, struct cppc_perf_fb_ctrs *perf_fb_ctrs) + { + return -ENOTSUPP; +diff --git a/include/linux/amd-pstate.h b/include/linux/amd-pstate.h +index 446394f846064..fa86bc953d3e0 100644 +--- a/include/linux/amd-pstate.h ++++ b/include/linux/amd-pstate.h +@@ -70,6 +70,7 @@ struct amd_cpudata { + u32 nominal_perf; + u32 lowest_nonlinear_perf; + u32 lowest_perf; ++ u32 prefcore_highest_perf; + + u32 max_freq; + u32 min_freq; +diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h +index 172ff51c1b2a4..766c83a4fae74 100644 +--- a/include/linux/cpufreq.h ++++ b/include/linux/cpufreq.h +@@ -231,6 +231,7 @@ int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu); + void refresh_frequency_limits(struct cpufreq_policy *policy); + void cpufreq_update_policy(unsigned int cpu); + void cpufreq_update_limits(unsigned int cpu); ++void cpufreq_update_highest_perf(unsigned int cpu); + bool have_governor_per_policy(void); + bool cpufreq_supports_freq_invariance(void); + struct kobject *get_governor_parent_kobj(struct cpufreq_policy *policy); +@@ -376,6 +377,9 @@ struct cpufreq_driver { + /* Called to update policy limits on firmware notifications. */ + void (*update_limits)(unsigned int cpu); + ++ /* Called to update highest performance on firmware notifications. */ ++ void (*update_highest_perf)(unsigned int cpu); ++ + /* optional */ + int (*bios_limit)(int cpu, unsigned int *limit); + +-- +2.41.0 + +From 85c40edbbd82439d1ca1e367eed47ad58119a341 Mon Sep 17 00:00:00 2001 +From: Peter Jung +Date: Sun, 13 Aug 2023 22:53:18 +0200 +Subject: [PATCH 2/6] bbr3 Signed-off-by: Peter Jung --- @@ -23,7 +680,7 @@ Signed-off-by: Peter Jung 15 files changed, 1934 insertions(+), 551 deletions(-) diff --git a/include/linux/tcp.h b/include/linux/tcp.h -index 91a37c99ba66..ae0ee688c3f7 100644 +index 91a37c99ba665..ae0ee688c3f7b 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h @@ -255,7 +255,9 @@ struct tcp_sock { @@ -38,7 +695,7 @@ index 91a37c99ba66..ae0ee688c3f7 100644 u32 chrono_stat[3]; /* Time in jiffies for chrono_stat stats */ u8 chrono_type:2, /* current chronograph type */ diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h -index c2b15f7e5516..a400a84088d3 100644 +index c2b15f7e55161..a400a84088d38 100644 --- a/include/net/inet_connection_sock.h +++ b/include/net/inet_connection_sock.h @@ -135,8 +135,8 @@ struct inet_connection_sock { @@ -53,7 +710,7 @@ index c2b15f7e5516..a400a84088d3 100644 #define ICSK_TIME_RETRANS 1 /* Retransmit timer */ diff --git a/include/net/tcp.h b/include/net/tcp.h -index 0ca972ebd3dd..8eb194559b70 100644 +index 0ca972ebd3dd0..8eb194559b701 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -370,6 +370,8 @@ static inline void tcp_dec_quickack_mode(struct sock *sk, @@ -225,7 +882,7 @@ index 0ca972ebd3dd..8eb194559b70 100644 static inline void tcp_plb_init(const struct sock *sk, struct tcp_plb_state *plb) diff --git a/include/uapi/linux/inet_diag.h b/include/uapi/linux/inet_diag.h -index 50655de04c9b..82f8bd8f0d16 100644 +index 50655de04c9b6..82f8bd8f0d161 100644 --- a/include/uapi/linux/inet_diag.h +++ b/include/uapi/linux/inet_diag.h @@ -229,6 +229,29 @@ struct tcp_bbr_info { @@ -259,7 +916,7 @@ index 50655de04c9b..82f8bd8f0d16 100644 union tcp_cc_info { diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h -index 51c13cf9c5ae..de8dcba26bec 100644 +index 51c13cf9c5aee..de8dcba26becc 100644 --- a/include/uapi/linux/rtnetlink.h +++ b/include/uapi/linux/rtnetlink.h @@ -506,9 +506,11 @@ enum { @@ -276,7 +933,7 @@ index 51c13cf9c5ae..de8dcba26bec 100644 struct rta_session { __u8 proto; diff --git a/include/uapi/linux/tcp.h b/include/uapi/linux/tcp.h -index 879eeb0a084b..77270053a5e3 100644 +index 879eeb0a084b4..77270053a5e39 100644 --- a/include/uapi/linux/tcp.h +++ b/include/uapi/linux/tcp.h @@ -170,6 +170,7 @@ enum tcp_fastopen_client_fail { @@ -288,7 +945,7 @@ index 879eeb0a084b..77270053a5e3 100644 /* * Sender's congestion state indicating normal or abnormal situations diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig -index 2dfb12230f08..2e14db3bee70 100644 +index 2dfb12230f089..2e14db3bee704 100644 --- a/net/ipv4/Kconfig +++ b/net/ipv4/Kconfig @@ -668,15 +668,18 @@ config TCP_CONG_BBR @@ -320,7 +977,7 @@ index 2dfb12230f08..2e14db3bee70 100644 choice prompt "Default TCP congestion control" diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c -index 8ed52e1e3c99..0198ac17f3a8 100644 +index 8ed52e1e3c99a..0198ac17f3a8f 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -3083,6 +3083,7 @@ int tcp_disconnect(struct sock *sk, int flags) @@ -341,7 +998,7 @@ index 8ed52e1e3c99..0198ac17f3a8 100644 info->tcpi_options |= TCPI_OPT_SYN_DATA; diff --git a/net/ipv4/tcp_bbr.c b/net/ipv4/tcp_bbr.c -index 146792cd26fe..f4f477a69917 100644 +index 146792cd26fed..f4f477a69917d 100644 --- a/net/ipv4/tcp_bbr.c +++ b/net/ipv4/tcp_bbr.c @@ -1,18 +1,19 @@ @@ -2986,7 +3643,7 @@ index 146792cd26fe..f4f477a69917 100644 MODULE_DESCRIPTION("TCP BBR (Bottleneck Bandwidth and RTT)"); +MODULE_VERSION(__stringify(BBR_VERSION)); diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c -index 1b34050a7538..66d40449b3f4 100644 +index 1b34050a7538b..66d40449b3f4f 100644 --- a/net/ipv4/tcp_cong.c +++ b/net/ipv4/tcp_cong.c @@ -241,6 +241,7 @@ void tcp_init_congestion_control(struct sock *sk) @@ -2998,7 +3655,7 @@ index 1b34050a7538..66d40449b3f4 100644 icsk->icsk_ca_ops->init(sk); if (tcp_ca_needs_ecn(sk)) diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c -index 57c8af1859c1..2195ba488142 100644 +index 57c8af1859c16..2195ba488142a 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -349,7 +349,7 @@ static void __tcp_ecn_check_ce(struct sock *sk, const struct sk_buff *skb) @@ -3132,7 +3789,7 @@ index 57c8af1859c1..2195ba488142 100644 tcp_in_quickack_mode(sk) || /* Protocol state mandates a one-time immediate ACK */ diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c -index c8f2aa003387..fdf51e436899 100644 +index c8f2aa0033871..fdf51e436899f 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c @@ -440,6 +440,8 @@ void tcp_ca_openreq_child(struct sock *sk, const struct dst_entry *dst) @@ -3145,7 +3802,7 @@ index c8f2aa003387..fdf51e436899 100644 const struct tcp_congestion_ops *ca; diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c -index 51d8638d4b4c..2fb064057868 100644 +index 51d8638d4b4c6..2fb064057868a 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -325,10 +325,9 @@ static void tcp_ecn_send_syn(struct sock *sk, struct sk_buff *skb) @@ -3256,7 +3913,7 @@ index 51d8638d4b4c..2fb064057868 100644 goto rearm_timer; diff --git a/net/ipv4/tcp_rate.c b/net/ipv4/tcp_rate.c -index a8f6d9d06f2e..8737f2134648 100644 +index a8f6d9d06f2eb..8737f21346481 100644 --- a/net/ipv4/tcp_rate.c +++ b/net/ipv4/tcp_rate.c @@ -34,6 +34,24 @@ @@ -3336,10 +3993,10 @@ index a8f6d9d06f2e..8737f2134648 100644 rs->interval_us = max(snd_us, ack_us); diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c -index 470f581eedd4..2b8d7e94a369 100644 +index 206418b6d7c48..619069963ff07 100644 --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c -@@ -624,6 +624,7 @@ void tcp_write_timer_handler(struct sock *sk) +@@ -626,6 +626,7 @@ void tcp_write_timer_handler(struct sock *sk) return; } @@ -3350,10 +4007,10 @@ index 470f581eedd4..2b8d7e94a369 100644 -- 2.41.0 -From 883b0afdb45d6c4944bf6b917196870726ce0caa Mon Sep 17 00:00:00 2001 +From 7f942a85c0cc0c584314cee751f793e8a7dc93ba Mon Sep 17 00:00:00 2001 From: Peter Jung -Date: Mon, 31 Jul 2023 12:19:39 +0200 -Subject: [PATCH 2/5] cachy +Date: Sun, 20 Aug 2023 15:54:59 +0200 +Subject: [PATCH 3/6] cachy Signed-off-by: Peter Jung --- @@ -3373,7 +4030,7 @@ Signed-off-by: Peter Jung arch/arc/configs/vdk_hs38_defconfig | 1 + arch/arc/configs/vdk_hs38_smp_defconfig | 1 + arch/x86/Kconfig.cpu | 427 ++- - arch/x86/Makefile | 44 +- + arch/x86/Makefile | 46 +- arch/x86/include/asm/pci.h | 6 + arch/x86/include/asm/vermagic.h | 74 + arch/x86/pci/common.c | 7 +- @@ -3407,17 +4064,17 @@ Signed-off-by: Peter Jung mm/swap.c | 5 + mm/vmpressure.c | 4 + mm/vmscan.c | 8 + - 50 files changed, 5288 insertions(+), 53 deletions(-) + 50 files changed, 5289 insertions(+), 54 deletions(-) create mode 100644 drivers/i2c/busses/i2c-nct6775.c create mode 100644 drivers/pci/controller/intel-nvme-remap.c create mode 100644 drivers/platform/x86/legion-laptop.c create mode 100644 drivers/platform/x86/steamdeck.c diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt -index a1457995fd41..0b33c7960259 100644 +index ac95d4c9666e4..b3eecf5b94f40 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt -@@ -4250,6 +4250,15 @@ +@@ -4276,6 +4276,15 @@ nomsi [MSI] If the PCI_MSI kernel config parameter is enabled, this kernel boot option can be used to disable the use of MSI interrupts system-wide. @@ -3434,7 +4091,7 @@ index a1457995fd41..0b33c7960259 100644 Safety option to keep boot IRQs enabled. This should never be necessary. diff --git a/Makefile b/Makefile -index 653238528aac..32ab6e225c91 100644 +index 4739c21a63e2e..daf528173b398 100644 --- a/Makefile +++ b/Makefile @@ -831,6 +831,9 @@ KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member) @@ -3460,7 +4117,7 @@ index 653238528aac..32ab6e225c91 100644 KBUILD_CFLAGS += -Werror=date-time diff --git a/arch/arc/configs/axs101_defconfig b/arch/arc/configs/axs101_defconfig -index 81764160451f..2c15d3bf747a 100644 +index 81764160451f7..2c15d3bf747a9 100644 --- a/arch/arc/configs/axs101_defconfig +++ b/arch/arc/configs/axs101_defconfig @@ -9,6 +9,7 @@ CONFIG_NAMESPACES=y @@ -3472,7 +4129,7 @@ index 81764160451f..2c15d3bf747a 100644 CONFIG_PERF_EVENTS=y # CONFIG_VM_EVENT_COUNTERS is not set diff --git a/arch/arc/configs/axs103_defconfig b/arch/arc/configs/axs103_defconfig -index d5181275490e..7d868e148d9a 100644 +index d5181275490ed..7d868e148d9a4 100644 --- a/arch/arc/configs/axs103_defconfig +++ b/arch/arc/configs/axs103_defconfig @@ -9,6 +9,7 @@ CONFIG_NAMESPACES=y @@ -3484,7 +4141,7 @@ index d5181275490e..7d868e148d9a 100644 CONFIG_PERF_EVENTS=y # CONFIG_VM_EVENT_COUNTERS is not set diff --git a/arch/arc/configs/axs103_smp_defconfig b/arch/arc/configs/axs103_smp_defconfig -index 07c89281c2e3..1513324ddb00 100644 +index 07c89281c2e3a..1513324ddb008 100644 --- a/arch/arc/configs/axs103_smp_defconfig +++ b/arch/arc/configs/axs103_smp_defconfig @@ -9,6 +9,7 @@ CONFIG_NAMESPACES=y @@ -3496,7 +4153,7 @@ index 07c89281c2e3..1513324ddb00 100644 CONFIG_PERF_EVENTS=y # CONFIG_VM_EVENT_COUNTERS is not set diff --git a/arch/arc/configs/haps_hs_defconfig b/arch/arc/configs/haps_hs_defconfig -index 8c3ed5d6e6c3..2db643853e8f 100644 +index 8c3ed5d6e6c35..2db643853e8f4 100644 --- a/arch/arc/configs/haps_hs_defconfig +++ b/arch/arc/configs/haps_hs_defconfig @@ -11,6 +11,7 @@ CONFIG_NAMESPACES=y @@ -3508,7 +4165,7 @@ index 8c3ed5d6e6c3..2db643853e8f 100644 CONFIG_PERF_EVENTS=y # CONFIG_COMPAT_BRK is not set diff --git a/arch/arc/configs/haps_hs_smp_defconfig b/arch/arc/configs/haps_hs_smp_defconfig -index 61107e8bac33..d764007e5ada 100644 +index 61107e8bac336..d764007e5adad 100644 --- a/arch/arc/configs/haps_hs_smp_defconfig +++ b/arch/arc/configs/haps_hs_smp_defconfig @@ -11,6 +11,7 @@ CONFIG_NAMESPACES=y @@ -3520,7 +4177,7 @@ index 61107e8bac33..d764007e5ada 100644 CONFIG_PERF_EVENTS=y # CONFIG_VM_EVENT_COUNTERS is not set diff --git a/arch/arc/configs/hsdk_defconfig b/arch/arc/configs/hsdk_defconfig -index 4ee2a1507b57..ce6a4431a76d 100644 +index 4ee2a1507b57f..ce6a4431a76dd 100644 --- a/arch/arc/configs/hsdk_defconfig +++ b/arch/arc/configs/hsdk_defconfig @@ -9,6 +9,7 @@ CONFIG_NAMESPACES=y @@ -3532,7 +4189,7 @@ index 4ee2a1507b57..ce6a4431a76d 100644 CONFIG_PERF_EVENTS=y # CONFIG_VM_EVENT_COUNTERS is not set diff --git a/arch/arc/configs/nsim_700_defconfig b/arch/arc/configs/nsim_700_defconfig -index 3e9829775992..5044609540cc 100644 +index 3e98297759925..5044609540cc3 100644 --- a/arch/arc/configs/nsim_700_defconfig +++ b/arch/arc/configs/nsim_700_defconfig @@ -11,6 +11,7 @@ CONFIG_NAMESPACES=y @@ -3544,7 +4201,7 @@ index 3e9829775992..5044609540cc 100644 CONFIG_EMBEDDED=y CONFIG_PERF_EVENTS=y diff --git a/arch/arc/configs/nsimosci_defconfig b/arch/arc/configs/nsimosci_defconfig -index 502c87f351c8..748c809d1c4c 100644 +index 502c87f351c87..748c809d1c4c6 100644 --- a/arch/arc/configs/nsimosci_defconfig +++ b/arch/arc/configs/nsimosci_defconfig @@ -10,6 +10,7 @@ CONFIG_NAMESPACES=y @@ -3556,7 +4213,7 @@ index 502c87f351c8..748c809d1c4c 100644 CONFIG_EMBEDDED=y CONFIG_PERF_EVENTS=y diff --git a/arch/arc/configs/nsimosci_hs_defconfig b/arch/arc/configs/nsimosci_hs_defconfig -index f721cc3997d0..205c32b0074c 100644 +index f721cc3997d02..205c32b0074ca 100644 --- a/arch/arc/configs/nsimosci_hs_defconfig +++ b/arch/arc/configs/nsimosci_hs_defconfig @@ -10,6 +10,7 @@ CONFIG_NAMESPACES=y @@ -3568,7 +4225,7 @@ index f721cc3997d0..205c32b0074c 100644 CONFIG_EMBEDDED=y CONFIG_PERF_EVENTS=y diff --git a/arch/arc/configs/nsimosci_hs_smp_defconfig b/arch/arc/configs/nsimosci_hs_smp_defconfig -index 1419fc946a08..2477b7c80977 100644 +index 1419fc946a083..2477b7c809771 100644 --- a/arch/arc/configs/nsimosci_hs_smp_defconfig +++ b/arch/arc/configs/nsimosci_hs_smp_defconfig @@ -8,6 +8,7 @@ CONFIG_IKCONFIG_PROC=y @@ -3580,7 +4237,7 @@ index 1419fc946a08..2477b7c80977 100644 # CONFIG_COMPAT_BRK is not set CONFIG_KPROBES=y diff --git a/arch/arc/configs/tb10x_defconfig b/arch/arc/configs/tb10x_defconfig -index 941bbadd6bf2..e61132ba4f89 100644 +index 941bbadd6bf2c..e61132ba4f890 100644 --- a/arch/arc/configs/tb10x_defconfig +++ b/arch/arc/configs/tb10x_defconfig @@ -14,6 +14,7 @@ CONFIG_INITRAMFS_SOURCE="../tb10x-rootfs.cpio" @@ -3592,7 +4249,7 @@ index 941bbadd6bf2..e61132ba4f89 100644 # CONFIG_AIO is not set CONFIG_EMBEDDED=y diff --git a/arch/arc/configs/vdk_hs38_defconfig b/arch/arc/configs/vdk_hs38_defconfig -index d3ef189c75f8..922b1b24f518 100644 +index d3ef189c75f8b..922b1b24f5184 100644 --- a/arch/arc/configs/vdk_hs38_defconfig +++ b/arch/arc/configs/vdk_hs38_defconfig @@ -4,6 +4,7 @@ CONFIG_HIGH_RES_TIMERS=y @@ -3604,7 +4261,7 @@ index d3ef189c75f8..922b1b24f518 100644 CONFIG_PERF_EVENTS=y # CONFIG_VM_EVENT_COUNTERS is not set diff --git a/arch/arc/configs/vdk_hs38_smp_defconfig b/arch/arc/configs/vdk_hs38_smp_defconfig -index 944b347025fd..ed64319f7eb2 100644 +index 944b347025fd1..ed64319f7eb29 100644 --- a/arch/arc/configs/vdk_hs38_smp_defconfig +++ b/arch/arc/configs/vdk_hs38_smp_defconfig @@ -4,6 +4,7 @@ CONFIG_HIGH_RES_TIMERS=y @@ -3616,7 +4273,7 @@ index 944b347025fd..ed64319f7eb2 100644 CONFIG_PERF_EVENTS=y # CONFIG_VM_EVENT_COUNTERS is not set diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu -index 00468adf180f..46cc91cb622f 100644 +index 00468adf180f1..46cc91cb622fc 100644 --- a/arch/x86/Kconfig.cpu +++ b/arch/x86/Kconfig.cpu @@ -157,7 +157,7 @@ config MPENTIUM4 @@ -4149,9 +4806,18 @@ index 00468adf180f..46cc91cb622f 100644 config IA32_FEAT_CTL def_bool y diff --git a/arch/x86/Makefile b/arch/x86/Makefile -index fdc2e3abd615..3787493b0247 100644 +index fdc2e3abd6152..63845db8bf8a5 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile +@@ -67,7 +67,7 @@ export BITS + # + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 + # +-KBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx ++KBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -O3 + KBUILD_RUSTFLAGS += -Ctarget-feature=-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2 + + ifeq ($(CONFIG_X86_KERNEL_IBT),y) @@ -151,8 +151,48 @@ else # FIXME - should be integrated in Makefile.cpu (Makefile_32.cpu) cflags-$(CONFIG_MK8) += -march=k8 @@ -4204,7 +4870,7 @@ index fdc2e3abd615..3787493b0247 100644 KBUILD_CFLAGS += $(cflags-y) diff --git a/arch/x86/include/asm/pci.h b/arch/x86/include/asm/pci.h -index b40c462b4af3..c4e66e60d559 100644 +index b40c462b4af36..c4e66e60d559d 100644 --- a/arch/x86/include/asm/pci.h +++ b/arch/x86/include/asm/pci.h @@ -27,6 +27,7 @@ struct pci_sysdata { @@ -4228,7 +4894,7 @@ index b40c462b4af3..c4e66e60d559 100644 already-configured bus numbers - to be used for buggy BIOSes or architectures with incomplete PCI setup by the loader */ diff --git a/arch/x86/include/asm/vermagic.h b/arch/x86/include/asm/vermagic.h -index 75884d2cdec3..02c1386eb653 100644 +index 75884d2cdec37..02c1386eb653e 100644 --- a/arch/x86/include/asm/vermagic.h +++ b/arch/x86/include/asm/vermagic.h @@ -17,6 +17,54 @@ @@ -4320,7 +4986,7 @@ index 75884d2cdec3..02c1386eb653 100644 #define MODULE_PROC_FAMILY "ELAN " #elif defined CONFIG_MCRUSOE diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c -index ddb798603201..7c20387d8202 100644 +index ddb798603201e..7c20387d82029 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c @@ -723,12 +723,15 @@ int pci_ext_cfg_avail(void) @@ -4342,7 +5008,7 @@ index ddb798603201..7c20387d8202 100644 } -#endif diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c -index 3cce6de464a7..9176bc4f07da 100644 +index 3cce6de464a7b..9176bc4f07daa 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -7627,6 +7627,7 @@ MODULE_ALIAS("bfq-iosched"); @@ -4366,7 +5032,7 @@ index 3cce6de464a7..9176bc4f07da 100644 slab_kill: diff --git a/drivers/Makefile b/drivers/Makefile -index 7241d80a7b29..ac0ca3498f43 100644 +index 7241d80a7b293..ac0ca3498f43e 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -64,15 +64,8 @@ obj-y += char/ @@ -4401,7 +5067,7 @@ index 7241d80a7b29..ac0ca3498f43 100644 obj-$(CONFIG_MTD) += mtd/ obj-$(CONFIG_SPI) += spi/ diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c -index addba109406b..f819ee132ffa 100644 +index addba109406be..f819ee132ffa2 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -1522,7 +1522,7 @@ static irqreturn_t ahci_thunderx_irq_handler(int irq, void *dev_instance) @@ -4457,7 +5123,7 @@ index addba109406b..f819ee132ffa 100644 sysfs_add_file_to_group(&pdev->dev.kobj, &dev_attr_remapped_nvme.attr, diff --git a/drivers/cpufreq/Kconfig.x86 b/drivers/cpufreq/Kconfig.x86 -index 438c9e75a04d..1bbfeca5f01e 100644 +index 438c9e75a04dc..1bbfeca5f01ec 100644 --- a/drivers/cpufreq/Kconfig.x86 +++ b/drivers/cpufreq/Kconfig.x86 @@ -9,7 +9,6 @@ config X86_INTEL_PSTATE @@ -4477,7 +5143,7 @@ index 438c9e75a04d..1bbfeca5f01e 100644 This driver adds a CPUFreq driver which utilizes a fine grain processor performance frequency control range instead of legacy diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig -index 9cfe8fc509d7..efc3b0c0b4ad 100644 +index 9cfe8fc509d7d..efc3b0c0b4adb 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -229,6 +229,15 @@ config I2C_CHT_WC @@ -4497,7 +5163,7 @@ index 9cfe8fc509d7..efc3b0c0b4ad 100644 tristate "Nvidia nForce2, nForce3 and nForce4" depends on PCI diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile -index af56fe2c75c0..76be74584719 100644 +index af56fe2c75c09..76be74584719e 100644 --- a/drivers/i2c/busses/Makefile +++ b/drivers/i2c/busses/Makefile @@ -20,6 +20,7 @@ obj-$(CONFIG_I2C_CHT_WC) += i2c-cht-wc.o @@ -4510,7 +5176,7 @@ index af56fe2c75c0..76be74584719 100644 obj-$(CONFIG_I2C_NVIDIA_GPU) += i2c-nvidia-gpu.o diff --git a/drivers/i2c/busses/i2c-nct6775.c b/drivers/i2c/busses/i2c-nct6775.c new file mode 100644 -index 000000000000..0462f0952043 +index 0000000000000..0462f09520431 --- /dev/null +++ b/drivers/i2c/busses/i2c-nct6775.c @@ -0,0 +1,647 @@ @@ -5162,7 +5828,7 @@ index 000000000000..0462f0952043 +module_init(i2c_nct6775_init); +module_exit(i2c_nct6775_exit); diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c -index 809fbd014cd6..d54b35b147ee 100644 +index 809fbd014cd68..d54b35b147ee9 100644 --- a/drivers/i2c/busses/i2c-piix4.c +++ b/drivers/i2c/busses/i2c-piix4.c @@ -568,11 +568,11 @@ static int piix4_transaction(struct i2c_adapter *piix4_adapter) @@ -5180,7 +5846,7 @@ index 809fbd014cd6..d54b35b147ee 100644 /* If the SMBus is still busy, we give up */ if (timeout == MAX_TIMEOUT) { diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c -index 1dc6227d353e..bab1009ccef7 100644 +index 1dc6227d353ec..bab1009ccef79 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -3240,6 +3240,11 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv) @@ -5196,7 +5862,7 @@ index 1dc6227d353e..bab1009ccef7 100644 if (ret < 0) goto bad; diff --git a/drivers/pci/controller/Makefile b/drivers/pci/controller/Makefile -index 37c8663de7fe..897d19f92ede 100644 +index 37c8663de7fe1..897d19f92edeb 100644 --- a/drivers/pci/controller/Makefile +++ b/drivers/pci/controller/Makefile @@ -1,4 +1,10 @@ @@ -5212,7 +5878,7 @@ index 37c8663de7fe..897d19f92ede 100644 obj-$(CONFIG_PCI_IXP4XX) += pci-ixp4xx.o diff --git a/drivers/pci/controller/intel-nvme-remap.c b/drivers/pci/controller/intel-nvme-remap.c new file mode 100644 -index 000000000000..e105e6f5cc91 +index 0000000000000..e105e6f5cc91d --- /dev/null +++ b/drivers/pci/controller/intel-nvme-remap.c @@ -0,0 +1,462 @@ @@ -5679,7 +6345,7 @@ index 000000000000..e105e6f5cc91 +MODULE_AUTHOR("Daniel Drake "); +MODULE_LICENSE("GPL v2"); diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c -index 321156ca273d..5dda26c737e2 100644 +index 321156ca273d5..5dda26c737e2c 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -3718,6 +3718,106 @@ static void quirk_no_bus_reset(struct pci_dev *dev) @@ -5798,7 +6464,7 @@ index 321156ca273d..5dda26c737e2 100644 }; diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig -index 49c2c4cd8d00..956f4eff85b5 100644 +index 49c2c4cd8d000..956f4eff85b5b 100644 --- a/drivers/platform/x86/Kconfig +++ b/drivers/platform/x86/Kconfig @@ -643,6 +643,16 @@ config THINKPAD_LMI @@ -5840,7 +6506,7 @@ index 49c2c4cd8d00..956f4eff85b5 100644 config P2SB diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile -index 52dfdf574ac2..d32b6d87219f 100644 +index 52dfdf574ac2d..d32b6d87219ff 100644 --- a/drivers/platform/x86/Makefile +++ b/drivers/platform/x86/Makefile @@ -66,6 +66,7 @@ obj-$(CONFIG_SENSORS_HDAPS) += hdaps.o @@ -5860,7 +6526,7 @@ index 52dfdf574ac2..d32b6d87219f 100644 +obj-$(CONFIG_STEAMDECK) += steamdeck.o diff --git a/drivers/platform/x86/legion-laptop.c b/drivers/platform/x86/legion-laptop.c new file mode 100644 -index 000000000000..d1268d239cc5 +index 0000000000000..d1268d239cc5f --- /dev/null +++ b/drivers/platform/x86/legion-laptop.c @@ -0,0 +1,2783 @@ @@ -8649,7 +9315,7 @@ index 000000000000..d1268d239cc5 +module_exit(legion_exit); diff --git a/drivers/platform/x86/steamdeck.c b/drivers/platform/x86/steamdeck.c new file mode 100644 -index 000000000000..77a6677ec19e +index 0000000000000..77a6677ec19e6 --- /dev/null +++ b/drivers/platform/x86/steamdeck.c @@ -0,0 +1,523 @@ @@ -9177,7 +9843,7 @@ index 000000000000..77a6677ec19e +MODULE_DESCRIPTION("Steam Deck ACPI platform driver"); +MODULE_LICENSE("GPL"); diff --git a/include/linux/mm.h b/include/linux/mm.h -index 406ab9ea818f..17794c213055 100644 +index 406ab9ea818fe..17794c2130550 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -191,7 +191,7 @@ static inline void __mm_zero_struct_page(struct page *page) @@ -9190,7 +9856,7 @@ index 406ab9ea818f..17794c213055 100644 extern int sysctl_max_map_count; diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h -index 716953ee1ebd..dace360dc38d 100644 +index 716953ee1ebdb..dace360dc38d7 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -1181,7 +1181,7 @@ struct readahead_control { @@ -9203,7 +9869,7 @@ index 716953ee1ebd..dace360dc38d 100644 void page_cache_ra_unbounded(struct readahead_control *, unsigned long nr_to_read, unsigned long lookahead_count); diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h -index 45f09bec02c4..87b20e2ee274 100644 +index 45f09bec02c48..87b20e2ee2744 100644 --- a/include/linux/user_namespace.h +++ b/include/linux/user_namespace.h @@ -148,6 +148,8 @@ static inline void set_userns_rlimit_max(struct user_namespace *ns, @@ -9225,7 +9891,7 @@ index 45f09bec02c4..87b20e2ee274 100644 { return &init_user_ns; diff --git a/init/Kconfig b/init/Kconfig -index f7f65af4ee12..71755cc8ed3e 100644 +index f7f65af4ee129..71755cc8ed3e4 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -123,6 +123,10 @@ config THREAD_INFO_IN_TASK @@ -9276,7 +9942,7 @@ index f7f65af4ee12..71755cc8ed3e 100644 bool "Optimize for size (-Os)" help diff --git a/kernel/Kconfig.hz b/kernel/Kconfig.hz -index 38ef6d06888e..0f78364efd4f 100644 +index 38ef6d06888ef..0f78364efd4f2 100644 --- a/kernel/Kconfig.hz +++ b/kernel/Kconfig.hz @@ -40,6 +40,27 @@ choice @@ -9318,7 +9984,7 @@ index 38ef6d06888e..0f78364efd4f 100644 config SCHED_HRTICK diff --git a/kernel/fork.c b/kernel/fork.c -index d2e12b6d2b18..95ca80492a37 100644 +index d2e12b6d2b180..95ca80492a379 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -100,6 +100,10 @@ @@ -9357,7 +10023,7 @@ index d2e12b6d2b18..95ca80492a37 100644 if (err) goto bad_unshare_out; diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c -index b3e25be58e2b..2c335df30171 100644 +index b3e25be58e2b7..2c335df301718 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -69,9 +69,13 @@ @@ -9417,7 +10083,7 @@ index b3e25be58e2b..2c335df30171 100644 #ifdef CONFIG_NUMA_BALANCING /* Restrict the NUMA promotion throughput (MB/s) for each target node. */ diff --git a/kernel/sysctl.c b/kernel/sysctl.c -index 354a2d294f52..4dc780aa3bcc 100644 +index 354a2d294f526..4dc780aa3bcc8 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -95,6 +95,9 @@ EXPORT_SYMBOL_GPL(sysctl_long_vals); @@ -9447,7 +10113,7 @@ index 354a2d294f52..4dc780aa3bcc 100644 { .procname = "tainted", diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c -index 1d8e47bed3f1..fec01d016a35 100644 +index 1d8e47bed3f11..fec01d016a351 100644 --- a/kernel/user_namespace.c +++ b/kernel/user_namespace.c @@ -22,6 +22,13 @@ @@ -9465,7 +10131,7 @@ index 1d8e47bed3f1..fec01d016a35 100644 static DEFINE_MUTEX(userns_state_mutex); diff --git a/mm/Kconfig b/mm/Kconfig -index 09130434e30d..f772ba88df87 100644 +index 09130434e30d3..f772ba88df878 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -631,7 +631,7 @@ config COMPACTION @@ -9478,7 +10144,7 @@ index 09130434e30d..f772ba88df87 100644 # diff --git a/mm/page-writeback.c b/mm/page-writeback.c -index d3f42009bb70..39b9fd060630 100644 +index d3f42009bb702..39b9fd0606304 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -71,7 +71,11 @@ static long ratelimit_pages = 32; @@ -9506,7 +10172,7 @@ index d3f42009bb70..39b9fd060630 100644 EXPORT_SYMBOL_GPL(dirty_writeback_interval); diff --git a/mm/swap.c b/mm/swap.c -index cd8f0150ba3a..42c405a4f114 100644 +index cd8f0150ba3aa..42c405a4f114c 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -1090,6 +1090,10 @@ void folio_batch_remove_exceptionals(struct folio_batch *fbatch) @@ -9527,7 +10193,7 @@ index cd8f0150ba3a..42c405a4f114 100644 +#endif } diff --git a/mm/vmpressure.c b/mm/vmpressure.c -index b52644771cc4..11a4b0e3b583 100644 +index b52644771cc43..11a4b0e3b583c 100644 --- a/mm/vmpressure.c +++ b/mm/vmpressure.c @@ -43,7 +43,11 @@ static const unsigned long vmpressure_win = SWAP_CLUSTER_MAX * 16; @@ -9543,7 +10209,7 @@ index b52644771cc4..11a4b0e3b583 100644 /* diff --git a/mm/vmscan.c b/mm/vmscan.c -index 1080209a568b..f76aa8268215 100644 +index 1080209a568bb..f76aa82682152 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -186,7 +186,11 @@ struct scan_control { @@ -9573,10 +10239,10 @@ index 1080209a568b..f76aa8268215 100644 -- 2.41.0 -From 0a48385ee928e0a277eb626a86efe9d4aec339f3 Mon Sep 17 00:00:00 2001 +From 84774938778953b047ed348f924e2c9fae19e5cc Mon Sep 17 00:00:00 2001 From: Peter Jung -Date: Mon, 31 Jul 2023 12:20:07 +0200 -Subject: [PATCH 3/5] fixes +Date: Sun, 20 Aug 2023 15:55:14 +0200 +Subject: [PATCH 4/6] fixes Signed-off-by: Peter Jung --- @@ -9588,7 +10254,7 @@ Signed-off-by: Peter Jung 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c -index 764d176e9735..deb10b89fa51 100644 +index 764d176e97351..deb10b89fa51f 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -945,7 +945,7 @@ static void btusb_qca_cmd_timeout(struct hci_dev *hdev) @@ -9601,7 +10267,7 @@ index 764d176e9735..deb10b89fa51 100644 return; diff --git a/include/linux/pageblock-flags.h b/include/linux/pageblock-flags.h -index e83c4c095041..21b8dfa5d828 100644 +index e83c4c0950417..21b8dfa5d8286 100644 --- a/include/linux/pageblock-flags.h +++ b/include/linux/pageblock-flags.h @@ -48,7 +48,7 @@ extern unsigned int pageblock_order; @@ -9614,7 +10280,7 @@ index e83c4c095041..21b8dfa5d828 100644 #endif /* CONFIG_HUGETLB_PAGE */ diff --git a/kernel/padata.c b/kernel/padata.c -index 222d60195de6..b8e6b7c48746 100644 +index 222d60195de66..b8e6b7c48746e 100644 --- a/kernel/padata.c +++ b/kernel/padata.c @@ -45,7 +45,7 @@ struct padata_mt_job_state { @@ -9636,7 +10302,7 @@ index 222d60195de6..b8e6b7c48746 100644 struct padata_work *pw = container_of(w, struct padata_work, pw_work); struct padata_mt_job_state *ps = pw->pw_data; diff --git a/mm/readahead.c b/mm/readahead.c -index a9c999aa19af..797494cec490 100644 +index a9c999aa19af6..797494cec4903 100644 --- a/mm/readahead.c +++ b/mm/readahead.c @@ -613,9 +613,17 @@ static void ondemand_readahead(struct readahead_control *ractl, @@ -9659,7 +10325,7 @@ index a9c999aa19af..797494cec490 100644 ra->size = start - index; /* old async_size */ ra->size += req_size; diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c -index ce5faa620517..1f0f2b8df300 100644 +index ce5faa6205170..1f0f2b8df3005 100644 --- a/sound/pci/hda/cs35l41_hda.c +++ b/sound/pci/hda/cs35l41_hda.c @@ -1235,7 +1235,7 @@ static int cs35l41_no_acpi_dsd(struct cs35l41_hda *cs35l41, struct device *physd @@ -9674,10 +10340,10 @@ index ce5faa620517..1f0f2b8df300 100644 -- 2.41.0 -From d5b404e3a7461e47b37cbfc3fbe009ba156e2c67 Mon Sep 17 00:00:00 2001 +From 4b328fcd2f946e4a517cd7f562482a5f0c9bbe04 Mon Sep 17 00:00:00 2001 From: Peter Jung Date: Mon, 10 Jul 2023 17:10:25 +0200 -Subject: [PATCH 4/5] ksm +Subject: [PATCH 5/6] ksm Signed-off-by: Peter Jung --- @@ -9714,7 +10380,7 @@ Signed-off-by: Peter Jung 30 files changed, 390 insertions(+), 18 deletions(-) diff --git a/Documentation/admin-guide/mm/ksm.rst b/Documentation/admin-guide/mm/ksm.rst -index 7626392fe82c..5c5be7bd84b8 100644 +index 7626392fe82cb..5c5be7bd84b81 100644 --- a/Documentation/admin-guide/mm/ksm.rst +++ b/Documentation/admin-guide/mm/ksm.rst @@ -173,6 +173,13 @@ stable_node_chains @@ -9765,7 +10431,7 @@ index 7626392fe82c..5c5be7bd84b8 100644 From the perspective of application, a high ratio of ``ksm_rmap_items`` to ``ksm_merging_pages`` means a bad madvise-applied policy, so developers or diff --git a/arch/alpha/kernel/syscalls/syscall.tbl b/arch/alpha/kernel/syscalls/syscall.tbl -index 1f13995d00d7..4a5bc2a91fa7 100644 +index 1f13995d00d7b..4a5bc2a91fa74 100644 --- a/arch/alpha/kernel/syscalls/syscall.tbl +++ b/arch/alpha/kernel/syscalls/syscall.tbl @@ -491,3 +491,6 @@ @@ -9776,7 +10442,7 @@ index 1f13995d00d7..4a5bc2a91fa7 100644 +563 common process_ksm_disable sys_process_ksm_disable +564 common process_ksm_status sys_process_ksm_status diff --git a/arch/arm/tools/syscall.tbl b/arch/arm/tools/syscall.tbl -index 8ebed8a13874..d616dcc060df 100644 +index 8ebed8a138747..d616dcc060df3 100644 --- a/arch/arm/tools/syscall.tbl +++ b/arch/arm/tools/syscall.tbl @@ -465,3 +465,6 @@ @@ -9787,7 +10453,7 @@ index 8ebed8a13874..d616dcc060df 100644 +453 common process_ksm_disable sys_process_ksm_disable +454 common process_ksm_status sys_process_ksm_status diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h -index 64a514f90131..63a8a9c4abc1 100644 +index 64a514f90131b..63a8a9c4abc16 100644 --- a/arch/arm64/include/asm/unistd.h +++ b/arch/arm64/include/asm/unistd.h @@ -39,7 +39,7 @@ @@ -9800,7 +10466,7 @@ index 64a514f90131..63a8a9c4abc1 100644 #define __ARCH_WANT_SYS_CLONE diff --git a/arch/arm64/include/asm/unistd32.h b/arch/arm64/include/asm/unistd32.h -index d952a28463e0..c99c8260489b 100644 +index d952a28463e01..c99c8260489b8 100644 --- a/arch/arm64/include/asm/unistd32.h +++ b/arch/arm64/include/asm/unistd32.h @@ -909,6 +909,12 @@ __SYSCALL(__NR_futex_waitv, sys_futex_waitv) @@ -9817,7 +10483,7 @@ index d952a28463e0..c99c8260489b 100644 /* * Please add new compat syscalls above this comment and update diff --git a/arch/ia64/kernel/syscalls/syscall.tbl b/arch/ia64/kernel/syscalls/syscall.tbl -index f8c74ffeeefb..735157909c6f 100644 +index f8c74ffeeefbe..735157909c6fb 100644 --- a/arch/ia64/kernel/syscalls/syscall.tbl +++ b/arch/ia64/kernel/syscalls/syscall.tbl @@ -372,3 +372,6 @@ @@ -9828,7 +10494,7 @@ index f8c74ffeeefb..735157909c6f 100644 +453 common process_ksm_disable sys_process_ksm_disable +454 common process_ksm_status sys_process_ksm_status diff --git a/arch/m68k/kernel/syscalls/syscall.tbl b/arch/m68k/kernel/syscalls/syscall.tbl -index 4f504783371f..25b22d311f10 100644 +index 4f504783371fc..25b22d311f108 100644 --- a/arch/m68k/kernel/syscalls/syscall.tbl +++ b/arch/m68k/kernel/syscalls/syscall.tbl @@ -451,3 +451,6 @@ @@ -9839,7 +10505,7 @@ index 4f504783371f..25b22d311f10 100644 +453 common process_ksm_disable sys_process_ksm_disable +454 common process_ksm_status sys_process_ksm_status diff --git a/arch/microblaze/kernel/syscalls/syscall.tbl b/arch/microblaze/kernel/syscalls/syscall.tbl -index 858d22bf275c..e548c182a33e 100644 +index 858d22bf275c2..e548c182a33ef 100644 --- a/arch/microblaze/kernel/syscalls/syscall.tbl +++ b/arch/microblaze/kernel/syscalls/syscall.tbl @@ -457,3 +457,6 @@ @@ -9850,7 +10516,7 @@ index 858d22bf275c..e548c182a33e 100644 +453 common process_ksm_disable sys_process_ksm_disable +454 common process_ksm_status sys_process_ksm_status diff --git a/arch/mips/kernel/syscalls/syscall_n32.tbl b/arch/mips/kernel/syscalls/syscall_n32.tbl -index 1976317d4e8b..fed21167be44 100644 +index 1976317d4e8b0..fed21167be444 100644 --- a/arch/mips/kernel/syscalls/syscall_n32.tbl +++ b/arch/mips/kernel/syscalls/syscall_n32.tbl @@ -390,3 +390,6 @@ @@ -9861,7 +10527,7 @@ index 1976317d4e8b..fed21167be44 100644 +453 n32 process_ksm_disable sys_process_ksm_disable +454 n32 process_ksm_status sys_process_ksm_status diff --git a/arch/mips/kernel/syscalls/syscall_n64.tbl b/arch/mips/kernel/syscalls/syscall_n64.tbl -index cfda2511badf..b27ae871f676 100644 +index cfda2511badf3..b27ae871f676f 100644 --- a/arch/mips/kernel/syscalls/syscall_n64.tbl +++ b/arch/mips/kernel/syscalls/syscall_n64.tbl @@ -366,3 +366,6 @@ @@ -9872,7 +10538,7 @@ index cfda2511badf..b27ae871f676 100644 +453 n64 process_ksm_disable sys_process_ksm_disable +454 n64 process_ksm_status sys_process_ksm_status diff --git a/arch/mips/kernel/syscalls/syscall_o32.tbl b/arch/mips/kernel/syscalls/syscall_o32.tbl -index 7692234c3768..59f298413c29 100644 +index 7692234c37683..59f298413c292 100644 --- a/arch/mips/kernel/syscalls/syscall_o32.tbl +++ b/arch/mips/kernel/syscalls/syscall_o32.tbl @@ -439,3 +439,6 @@ @@ -9883,7 +10549,7 @@ index 7692234c3768..59f298413c29 100644 +453 o32 process_ksm_disable sys_process_ksm_disable +454 o32 process_ksm_status sys_process_ksm_status diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl -index a0a9145b6dd4..494b59d1185f 100644 +index a0a9145b6dd4f..494b59d1185fa 100644 --- a/arch/parisc/kernel/syscalls/syscall.tbl +++ b/arch/parisc/kernel/syscalls/syscall.tbl @@ -450,3 +450,6 @@ @@ -9894,7 +10560,7 @@ index a0a9145b6dd4..494b59d1185f 100644 +453 common process_ksm_disable sys_process_ksm_disable +454 common process_ksm_status sys_process_ksm_status diff --git a/arch/powerpc/kernel/syscalls/syscall.tbl b/arch/powerpc/kernel/syscalls/syscall.tbl -index 8c0b08b7a80e..499d7b233a43 100644 +index 8c0b08b7a80ec..499d7b233a431 100644 --- a/arch/powerpc/kernel/syscalls/syscall.tbl +++ b/arch/powerpc/kernel/syscalls/syscall.tbl @@ -538,3 +538,6 @@ @@ -9905,7 +10571,7 @@ index 8c0b08b7a80e..499d7b233a43 100644 +453 common process_ksm_disable sys_process_ksm_disable +454 common process_ksm_status sys_process_ksm_status diff --git a/arch/s390/kernel/syscalls/syscall.tbl b/arch/s390/kernel/syscalls/syscall.tbl -index a6935af2235c..97b36ce15155 100644 +index a6935af2235ca..97b36ce151556 100644 --- a/arch/s390/kernel/syscalls/syscall.tbl +++ b/arch/s390/kernel/syscalls/syscall.tbl @@ -454,3 +454,6 @@ @@ -9916,7 +10582,7 @@ index a6935af2235c..97b36ce15155 100644 +453 common process_ksm_disable sys_process_ksm_disable sys_process_ksm_disable +454 common process_ksm_status sys_process_ksm_status sys_process_ksm_status diff --git a/arch/sh/kernel/syscalls/syscall.tbl b/arch/sh/kernel/syscalls/syscall.tbl -index 97377e8c5025..bd3827e1fc8d 100644 +index 97377e8c50251..bd3827e1fc8d9 100644 --- a/arch/sh/kernel/syscalls/syscall.tbl +++ b/arch/sh/kernel/syscalls/syscall.tbl @@ -454,3 +454,6 @@ @@ -9927,7 +10593,7 @@ index 97377e8c5025..bd3827e1fc8d 100644 +453 common process_ksm_disable sys_process_ksm_disable +454 common process_ksm_status sys_process_ksm_status diff --git a/arch/sparc/kernel/syscalls/syscall.tbl b/arch/sparc/kernel/syscalls/syscall.tbl -index faa835f3c54a..c05e62a0ca02 100644 +index faa835f3c54a5..c05e62a0ca026 100644 --- a/arch/sparc/kernel/syscalls/syscall.tbl +++ b/arch/sparc/kernel/syscalls/syscall.tbl @@ -497,3 +497,6 @@ @@ -9938,7 +10604,7 @@ index faa835f3c54a..c05e62a0ca02 100644 +453 common process_ksm_disable sys_process_ksm_disable +454 common process_ksm_status sys_process_ksm_status diff --git a/arch/x86/entry/syscalls/syscall_32.tbl b/arch/x86/entry/syscalls/syscall_32.tbl -index bc0a3c941b35..c79bd2dd758d 100644 +index bc0a3c941b35c..c79bd2dd758da 100644 --- a/arch/x86/entry/syscalls/syscall_32.tbl +++ b/arch/x86/entry/syscalls/syscall_32.tbl @@ -456,3 +456,6 @@ @@ -9949,7 +10615,7 @@ index bc0a3c941b35..c79bd2dd758d 100644 +453 i386 process_ksm_disable sys_process_ksm_disable +454 i386 process_ksm_status sys_process_ksm_status diff --git a/arch/x86/entry/syscalls/syscall_64.tbl b/arch/x86/entry/syscalls/syscall_64.tbl -index 227538b0ce80..e146a70cc299 100644 +index 227538b0ce801..e146a70cc299f 100644 --- a/arch/x86/entry/syscalls/syscall_64.tbl +++ b/arch/x86/entry/syscalls/syscall_64.tbl @@ -373,6 +373,9 @@ @@ -9963,7 +10629,7 @@ index 227538b0ce80..e146a70cc299 100644 # # Due to a historical design error, certain syscalls are numbered differently diff --git a/arch/xtensa/kernel/syscalls/syscall.tbl b/arch/xtensa/kernel/syscalls/syscall.tbl -index 2b69c3c035b6..b7bf81a3ba13 100644 +index 2b69c3c035b6a..b7bf81a3ba133 100644 --- a/arch/xtensa/kernel/syscalls/syscall.tbl +++ b/arch/xtensa/kernel/syscalls/syscall.tbl @@ -422,3 +422,6 @@ @@ -9974,7 +10640,7 @@ index 2b69c3c035b6..b7bf81a3ba13 100644 +453 common process_ksm_disable sys_process_ksm_disable +454 common process_ksm_status sys_process_ksm_status diff --git a/fs/proc/base.c b/fs/proc/base.c -index 05452c3b9872..eb2e498e3b8d 100644 +index 9df3f48396628..0fedd00505771 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -3207,6 +3207,7 @@ static int proc_pid_ksm_stat(struct seq_file *m, struct pid_namespace *ns, @@ -9986,7 +10652,7 @@ index 05452c3b9872..eb2e498e3b8d 100644 seq_printf(m, "ksm_process_profit %ld\n", ksm_process_profit(mm)); mmput(mm); diff --git a/include/linux/ksm.h b/include/linux/ksm.h -index 899a314bc487..c2dd786a30e1 100644 +index 899a314bc4872..c2dd786a30e1f 100644 --- a/include/linux/ksm.h +++ b/include/linux/ksm.h @@ -26,6 +26,22 @@ int ksm_disable(struct mm_struct *mm); @@ -10024,7 +10690,7 @@ index 899a314bc487..c2dd786a30e1 100644 static inline void collect_procs_ksm(struct page *page, struct list_head *to_kill, int force_early) diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h -index 5e74ce4a28cd..51d04c1847c1 100644 +index 5e74ce4a28cd6..51d04c1847c11 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -812,7 +812,7 @@ struct mm_struct { @@ -10051,7 +10717,7 @@ index 5e74ce4a28cd..51d04c1847c1 100644 struct { /* this mm_struct is on lru_gen_mm_list */ diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h -index 03e3d0121d5e..16597dea90f4 100644 +index 03e3d0121d5e3..16597dea90f40 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -813,6 +813,9 @@ asmlinkage long sys_madvise(unsigned long start, size_t len, int behavior); @@ -10065,7 +10731,7 @@ index 03e3d0121d5e..16597dea90f4 100644 unsigned long prot, unsigned long pgoff, unsigned long flags); diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h -index fd6c1cb585db..11d0fc82c437 100644 +index fd6c1cb585db4..11d0fc82c4378 100644 --- a/include/uapi/asm-generic/unistd.h +++ b/include/uapi/asm-generic/unistd.h @@ -820,8 +820,17 @@ __SYSCALL(__NR_set_mempolicy_home_node, sys_set_mempolicy_home_node) @@ -10088,7 +10754,7 @@ index fd6c1cb585db..11d0fc82c437 100644 /* * 32 bit systems traditionally used different diff --git a/kernel/sys.c b/kernel/sys.c -index 2410e3999ebe..b0841a2dd2b7 100644 +index 2410e3999ebe5..b0841a2dd2b7a 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -2727,6 +2727,153 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3, @@ -10246,7 +10912,7 @@ index 2410e3999ebe..b0841a2dd2b7 100644 struct getcpu_cache __user *, unused) { diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c -index 781de7cc6a4e..49a35d35d0f9 100644 +index 781de7cc6a4e1..49a35d35d0f97 100644 --- a/kernel/sys_ni.c +++ b/kernel/sys_ni.c @@ -184,6 +184,9 @@ COND_SYSCALL(mincore); @@ -10260,7 +10926,7 @@ index 781de7cc6a4e..49a35d35d0f9 100644 COND_SYSCALL(mbind); COND_SYSCALL(get_mempolicy); diff --git a/mm/khugepaged.c b/mm/khugepaged.c -index 78c8d5d8b628..4b8b8673d5d9 100644 +index 78c8d5d8b6284..4b8b8673d5d9f 100644 --- a/mm/khugepaged.c +++ b/mm/khugepaged.c @@ -19,6 +19,7 @@ @@ -10280,7 +10946,7 @@ index 78c8d5d8b628..4b8b8673d5d9 100644 } else { src_page = pte_page(pteval); diff --git a/mm/ksm.c b/mm/ksm.c -index ba266359da55..97a9627116fa 100644 +index d20d7662419be..74804158ee02d 100644 --- a/mm/ksm.c +++ b/mm/ksm.c @@ -278,6 +278,9 @@ static unsigned int zero_checksum __read_mostly; @@ -10320,7 +10986,7 @@ index ba266359da55..97a9627116fa 100644 /* * We're replacing an anonymous page with a zero page, which is * not anonymous. We need to do proper accounting otherwise we -@@ -3082,7 +3092,7 @@ static void wait_while_offlining(void) +@@ -3084,7 +3094,7 @@ static void wait_while_offlining(void) #ifdef CONFIG_PROC_FS long ksm_process_profit(struct mm_struct *mm) { @@ -10329,7 +10995,7 @@ index ba266359da55..97a9627116fa 100644 mm->ksm_rmap_items * sizeof(struct ksm_rmap_item); } #endif /* CONFIG_PROC_FS */ -@@ -3351,12 +3361,19 @@ static ssize_t pages_volatile_show(struct kobject *kobj, +@@ -3353,12 +3363,19 @@ static ssize_t pages_volatile_show(struct kobject *kobj, } KSM_ATTR_RO(pages_volatile); @@ -10350,7 +11016,7 @@ index ba266359da55..97a9627116fa 100644 ksm_rmap_items * sizeof(struct ksm_rmap_item); return sysfs_emit(buf, "%ld\n", general_profit); -@@ -3418,6 +3435,7 @@ static struct attribute *ksm_attrs[] = { +@@ -3420,6 +3437,7 @@ static struct attribute *ksm_attrs[] = { &pages_sharing_attr.attr, &pages_unshared_attr.attr, &pages_volatile_attr.attr, @@ -10359,7 +11025,7 @@ index ba266359da55..97a9627116fa 100644 #ifdef CONFIG_NUMA &merge_across_nodes_attr.attr, diff --git a/mm/memory.c b/mm/memory.c -index 603b2f419948..d8c7824558b4 100644 +index 1ec1ef3418bf5..014dd58b3ffe9 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -1433,8 +1433,10 @@ static unsigned long zap_pte_range(struct mmu_gather *tlb, @@ -10383,7 +11049,7 @@ index 603b2f419948..d8c7824558b4 100644 } flush_cache_page(vma, vmf->address, pte_pfn(vmf->orig_pte)); diff --git a/tools/testing/selftests/mm/ksm_functional_tests.c b/tools/testing/selftests/mm/ksm_functional_tests.c -index 26853badae70..0de9d33cd565 100644 +index 26853badae705..0de9d33cd565d 100644 --- a/tools/testing/selftests/mm/ksm_functional_tests.c +++ b/tools/testing/selftests/mm/ksm_functional_tests.c @@ -29,6 +29,8 @@ @@ -10524,10 +11190,10 @@ index 26853badae70..0de9d33cd565 100644 -- 2.41.0 -From 4e22e9e9fa30a6a257a12a24844d77c4e8362b71 Mon Sep 17 00:00:00 2001 +From e376a8aadd07d72875ff77bfc6c3d2ba9ac549bd Mon Sep 17 00:00:00 2001 From: Peter Jung Date: Mon, 10 Jul 2023 17:11:55 +0200 -Subject: [PATCH 5/5] zstd +Subject: [PATCH 6/6] zstd Signed-off-by: Peter Jung --- @@ -10594,7 +11260,7 @@ Signed-off-by: Peter Jung create mode 100644 lib/zstd/common/bits.h diff --git a/include/linux/zstd.h b/include/linux/zstd.h -index 113408eef6ec..f109d49f43f8 100644 +index 113408eef6ece..f109d49f43f80 100644 --- a/include/linux/zstd.h +++ b/include/linux/zstd.h @@ -1,6 +1,6 @@ @@ -10606,7 +11272,7 @@ index 113408eef6ec..f109d49f43f8 100644 * * This source code is licensed under both the BSD-style license (found in the diff --git a/include/linux/zstd_errors.h b/include/linux/zstd_errors.h -index 58b6dd45a969..6d5cf55f0bf3 100644 +index 58b6dd45a969f..6d5cf55f0bf3e 100644 --- a/include/linux/zstd_errors.h +++ b/include/linux/zstd_errors.h @@ -1,5 +1,6 @@ @@ -10672,7 +11338,7 @@ index 58b6dd45a969..6d5cf55f0bf3 100644 } ZSTD_ErrorCode; diff --git a/include/linux/zstd_lib.h b/include/linux/zstd_lib.h -index 79d55465d5c1..8b4ffe649df5 100644 +index 79d55465d5c1d..8b4ffe649df57 100644 --- a/include/linux/zstd_lib.h +++ b/include/linux/zstd_lib.h @@ -1,5 +1,6 @@ @@ -11864,7 +12530,7 @@ index 79d55465d5c1..8b4ffe649df5 100644 #endif /* ZSTD_H_ZSTD_STATIC_LINKING_ONLY */ diff --git a/lib/zstd/Makefile b/lib/zstd/Makefile -index 20f08c644b71..464c410b2768 100644 +index 20f08c644b71a..464c410b2768c 100644 --- a/lib/zstd/Makefile +++ b/lib/zstd/Makefile @@ -1,6 +1,6 @@ @@ -11877,7 +12543,7 @@ index 20f08c644b71..464c410b2768 100644 # This source code is licensed under both the BSD-style license (found in the diff --git a/lib/zstd/common/allocations.h b/lib/zstd/common/allocations.h new file mode 100644 -index 000000000000..05adbbeccaa9 +index 0000000000000..05adbbeccaa9b --- /dev/null +++ b/lib/zstd/common/allocations.h @@ -0,0 +1,56 @@ @@ -11939,7 +12605,7 @@ index 000000000000..05adbbeccaa9 +#endif /* ZSTD_ALLOCATIONS_H */ diff --git a/lib/zstd/common/bits.h b/lib/zstd/common/bits.h new file mode 100644 -index 000000000000..aa3487ec4b6a +index 0000000000000..aa3487ec4b6a7 --- /dev/null +++ b/lib/zstd/common/bits.h @@ -0,0 +1,149 @@ @@ -12093,7 +12759,7 @@ index 000000000000..aa3487ec4b6a + +#endif /* ZSTD_BITS_H */ diff --git a/lib/zstd/common/bitstream.h b/lib/zstd/common/bitstream.h -index feef3a1b1d60..444dc4f85c64 100644 +index feef3a1b1d600..444dc4f85c649 100644 --- a/lib/zstd/common/bitstream.h +++ b/lib/zstd/common/bitstream.h @@ -1,7 +1,8 @@ @@ -12220,7 +12886,7 @@ index feef3a1b1d60..444dc4f85c64 100644 if (bitD->bitsConsumed > (sizeof(bitD->bitContainer)*8)) /* overflow detected, like end of stream */ return BIT_DStream_overflow; diff --git a/lib/zstd/common/compiler.h b/lib/zstd/common/compiler.h -index c42d39faf9bd..c437e0975575 100644 +index c42d39faf9bd8..c437e09755750 100644 --- a/lib/zstd/common/compiler.h +++ b/lib/zstd/common/compiler.h @@ -1,5 +1,6 @@ @@ -12250,7 +12916,7 @@ index c42d39faf9bd..c437e0975575 100644 #endif /* ZSTD_COMPILER_H */ diff --git a/lib/zstd/common/cpu.h b/lib/zstd/common/cpu.h -index 0db7b42407ee..d8319a2bef4c 100644 +index 0db7b42407eea..d8319a2bef4ce 100644 --- a/lib/zstd/common/cpu.h +++ b/lib/zstd/common/cpu.h @@ -1,5 +1,6 @@ @@ -12262,7 +12928,7 @@ index 0db7b42407ee..d8319a2bef4c 100644 * * This source code is licensed under both the BSD-style license (found in the diff --git a/lib/zstd/common/debug.c b/lib/zstd/common/debug.c -index bb863c9ea616..e56ff6464e91 100644 +index bb863c9ea6164..e56ff6464e918 100644 --- a/lib/zstd/common/debug.c +++ b/lib/zstd/common/debug.c @@ -1,7 +1,8 @@ @@ -12276,7 +12942,7 @@ index bb863c9ea616..e56ff6464e91 100644 * You can contact the author at : * - Source repository : https://github.com/Cyan4973/FiniteStateEntropy diff --git a/lib/zstd/common/debug.h b/lib/zstd/common/debug.h -index 6dd88d1fbd02..da0dbfc614b8 100644 +index 6dd88d1fbd02c..da0dbfc614b88 100644 --- a/lib/zstd/common/debug.h +++ b/lib/zstd/common/debug.h @@ -1,7 +1,8 @@ @@ -12290,7 +12956,7 @@ index 6dd88d1fbd02..da0dbfc614b8 100644 * You can contact the author at : * - Source repository : https://github.com/Cyan4973/FiniteStateEntropy diff --git a/lib/zstd/common/entropy_common.c b/lib/zstd/common/entropy_common.c -index fef67056f052..6cdd82233fb5 100644 +index fef67056f0524..6cdd82233fb59 100644 --- a/lib/zstd/common/entropy_common.c +++ b/lib/zstd/common/entropy_common.c @@ -1,6 +1,7 @@ @@ -12408,7 +13074,7 @@ index fef67056f052..6cdd82233fb5 100644 return HUF_readStats_body_default(huffWeight, hwSize, rankStats, nbSymbolsPtr, tableLogPtr, src, srcSize, workSpace, wkspSize); } diff --git a/lib/zstd/common/error_private.c b/lib/zstd/common/error_private.c -index 6d1135f8c373..a4062d30d170 100644 +index 6d1135f8c3733..a4062d30d1703 100644 --- a/lib/zstd/common/error_private.c +++ b/lib/zstd/common/error_private.c @@ -1,5 +1,6 @@ @@ -12456,7 +13122,7 @@ index 6d1135f8c373..a4062d30d170 100644 default: return notErrorCode; } diff --git a/lib/zstd/common/error_private.h b/lib/zstd/common/error_private.h -index ca5101e542fa..9a4699a38a88 100644 +index ca5101e542faa..9a4699a38a881 100644 --- a/lib/zstd/common/error_private.h +++ b/lib/zstd/common/error_private.h @@ -1,5 +1,6 @@ @@ -12468,7 +13134,7 @@ index ca5101e542fa..9a4699a38a88 100644 * * This source code is licensed under both the BSD-style license (found in the diff --git a/lib/zstd/common/fse.h b/lib/zstd/common/fse.h -index 4507043b2287..c4e25a219142 100644 +index 4507043b2287c..c4e25a2191429 100644 --- a/lib/zstd/common/fse.h +++ b/lib/zstd/common/fse.h @@ -1,7 +1,8 @@ @@ -12620,7 +13286,7 @@ index 4507043b2287..c4e25a219142 100644 * note 2 : if freq[symbolValue]==0, @return a fake cost of tableLog+1 bits */ MEM_STATIC U32 FSE_getMaxNbBits(const void* symbolTTPtr, U32 symbolValue) diff --git a/lib/zstd/common/fse_decompress.c b/lib/zstd/common/fse_decompress.c -index a0d06095be83..45cf457f31ef 100644 +index a0d06095be83d..45cf457f31ef8 100644 --- a/lib/zstd/common/fse_decompress.c +++ b/lib/zstd/common/fse_decompress.c @@ -1,6 +1,7 @@ @@ -12780,7 +13446,7 @@ index a0d06095be83..45cf457f31ef 100644 - #endif /* FSE_COMMONDEFS_ONLY */ diff --git a/lib/zstd/common/huf.h b/lib/zstd/common/huf.h -index 5042ff870308..8e7943092ed1 100644 +index 5042ff8703087..8e7943092ed1a 100644 --- a/lib/zstd/common/huf.h +++ b/lib/zstd/common/huf.h @@ -1,7 +1,8 @@ @@ -13107,7 +13773,7 @@ index 5042ff870308..8e7943092ed1 100644 +#endif /* HUF_H_298734234 */ diff --git a/lib/zstd/common/mem.h b/lib/zstd/common/mem.h -index 1d9cc03924ca..a7231822b6e3 100644 +index 1d9cc03924ca9..a7231822b6e32 100644 --- a/lib/zstd/common/mem.h +++ b/lib/zstd/common/mem.h @@ -1,6 +1,6 @@ @@ -13119,7 +13785,7 @@ index 1d9cc03924ca..a7231822b6e3 100644 * * This source code is licensed under both the BSD-style license (found in the diff --git a/lib/zstd/common/portability_macros.h b/lib/zstd/common/portability_macros.h -index 0e3b2c0a527d..7ede8cf1ffe5 100644 +index 0e3b2c0a527db..7ede8cf1ffe57 100644 --- a/lib/zstd/common/portability_macros.h +++ b/lib/zstd/common/portability_macros.h @@ -1,5 +1,6 @@ @@ -13173,7 +13839,7 @@ index 0e3b2c0a527d..7ede8cf1ffe5 100644 + #endif /* ZSTD_PORTABILITY_MACROS_H */ diff --git a/lib/zstd/common/zstd_common.c b/lib/zstd/common/zstd_common.c -index 3d7e35b309b5..44b95b25344a 100644 +index 3d7e35b309b5d..44b95b25344a1 100644 --- a/lib/zstd/common/zstd_common.c +++ b/lib/zstd/common/zstd_common.c @@ -1,5 +1,6 @@ @@ -13231,7 +13897,7 @@ index 3d7e35b309b5..44b95b25344a 100644 - } -} diff --git a/lib/zstd/common/zstd_deps.h b/lib/zstd/common/zstd_deps.h -index 2c34e8a33a1c..670c5fa2a952 100644 +index 2c34e8a33a1c1..670c5fa2a952d 100644 --- a/lib/zstd/common/zstd_deps.h +++ b/lib/zstd/common/zstd_deps.h @@ -1,6 +1,6 @@ @@ -13265,7 +13931,7 @@ index 2c34e8a33a1c..670c5fa2a952 100644 +#endif /* ZSTD_DEPS_STDINT */ +#endif /* ZSTD_DEPS_NEED_STDINT */ diff --git a/lib/zstd/common/zstd_internal.h b/lib/zstd/common/zstd_internal.h -index 93305d9b41bb..7f023e4d4774 100644 +index 93305d9b41bba..7f023e4d47740 100644 --- a/lib/zstd/common/zstd_internal.h +++ b/lib/zstd/common/zstd_internal.h @@ -1,5 +1,6 @@ @@ -13451,7 +14117,7 @@ index 93305d9b41bb..7f023e4d4774 100644 /* ZSTD_invalidateRepCodes() : diff --git a/lib/zstd/compress/clevels.h b/lib/zstd/compress/clevels.h -index d9a76112ec3a..6ab8be6532ef 100644 +index d9a76112ec3af..6ab8be6532efc 100644 --- a/lib/zstd/compress/clevels.h +++ b/lib/zstd/compress/clevels.h @@ -1,5 +1,6 @@ @@ -13463,7 +14129,7 @@ index d9a76112ec3a..6ab8be6532ef 100644 * * This source code is licensed under both the BSD-style license (found in the diff --git a/lib/zstd/compress/fse_compress.c b/lib/zstd/compress/fse_compress.c -index ec5b1ca6d71a..e46ca6621b48 100644 +index ec5b1ca6d71af..e46ca6621b488 100644 --- a/lib/zstd/compress/fse_compress.c +++ b/lib/zstd/compress/fse_compress.c @@ -1,6 +1,7 @@ @@ -13582,7 +14248,7 @@ index ec5b1ca6d71a..e46ca6621b48 100644 - #endif /* FSE_COMMONDEFS_ONLY */ diff --git a/lib/zstd/compress/hist.c b/lib/zstd/compress/hist.c -index 3ddc6dfb6894..0b12587cc14b 100644 +index 3ddc6dfb68948..0b12587cc14b1 100644 --- a/lib/zstd/compress/hist.c +++ b/lib/zstd/compress/hist.c @@ -1,7 +1,8 @@ @@ -13596,7 +14262,7 @@ index 3ddc6dfb6894..0b12587cc14b 100644 * You can contact the author at : * - FSE source repository : https://github.com/Cyan4973/FiniteStateEntropy diff --git a/lib/zstd/compress/hist.h b/lib/zstd/compress/hist.h -index fc1830abc9c6..f7687b0fc20a 100644 +index fc1830abc9c63..f7687b0fc20a0 100644 --- a/lib/zstd/compress/hist.h +++ b/lib/zstd/compress/hist.h @@ -1,7 +1,8 @@ @@ -13610,7 +14276,7 @@ index fc1830abc9c6..f7687b0fc20a 100644 * You can contact the author at : * - FSE source repository : https://github.com/Cyan4973/FiniteStateEntropy diff --git a/lib/zstd/compress/huf_compress.c b/lib/zstd/compress/huf_compress.c -index 74ef0db47621..83241abafe35 100644 +index 74ef0db476210..83241abafe35e 100644 --- a/lib/zstd/compress/huf_compress.c +++ b/lib/zstd/compress/huf_compress.c @@ -1,6 +1,7 @@ @@ -14367,7 +15033,7 @@ index 74ef0db47621..83241abafe35 100644 } - diff --git a/lib/zstd/compress/zstd_compress.c b/lib/zstd/compress/zstd_compress.c -index f620cafca633..c1c316e9e289 100644 +index f620cafca633b..c1c316e9e289f 100644 --- a/lib/zstd/compress/zstd_compress.c +++ b/lib/zstd/compress/zstd_compress.c @@ -1,5 +1,6 @@ @@ -17749,7 +18415,7 @@ index f620cafca633..c1c316e9e289 100644 + } +} diff --git a/lib/zstd/compress/zstd_compress_internal.h b/lib/zstd/compress/zstd_compress_internal.h -index 71697a11ae30..899f5e2de8e9 100644 +index 71697a11ae305..899f5e2de8e96 100644 --- a/lib/zstd/compress/zstd_compress_internal.h +++ b/lib/zstd/compress/zstd_compress_internal.h @@ -1,5 +1,6 @@ @@ -18303,7 +18969,7 @@ index 71697a11ae30..899f5e2de8e9 100644 + #endif /* ZSTD_COMPRESS_H */ diff --git a/lib/zstd/compress/zstd_compress_literals.c b/lib/zstd/compress/zstd_compress_literals.c -index 52b0a8059aba..3e9ea46a670a 100644 +index 52b0a8059aba9..3e9ea46a670a6 100644 --- a/lib/zstd/compress/zstd_compress_literals.c +++ b/lib/zstd/compress/zstd_compress_literals.c @@ -1,5 +1,6 @@ @@ -18545,7 +19211,7 @@ index 52b0a8059aba..3e9ea46a670a 100644 MEM_writeLE32(ostart, lhc); ostart[4] = (BYTE)(cLitSize >> 10); diff --git a/lib/zstd/compress/zstd_compress_literals.h b/lib/zstd/compress/zstd_compress_literals.h -index 9775fb97cb70..a2a85d6b69e5 100644 +index 9775fb97cb702..a2a85d6b69e53 100644 --- a/lib/zstd/compress/zstd_compress_literals.h +++ b/lib/zstd/compress/zstd_compress_literals.h @@ -1,5 +1,6 @@ @@ -18589,7 +19255,7 @@ index 9775fb97cb70..a2a85d6b69e5 100644 #endif /* ZSTD_COMPRESS_LITERALS_H */ diff --git a/lib/zstd/compress/zstd_compress_sequences.c b/lib/zstd/compress/zstd_compress_sequences.c -index 21ddc1b37acf..5c028c78d889 100644 +index 21ddc1b37acf8..5c028c78d889b 100644 --- a/lib/zstd/compress/zstd_compress_sequences.c +++ b/lib/zstd/compress/zstd_compress_sequences.c @@ -1,5 +1,6 @@ @@ -18619,7 +19285,7 @@ index 21ddc1b37acf..5c028c78d889 100644 * If basic encoding isn't possible, always choose RLE. */ diff --git a/lib/zstd/compress/zstd_compress_sequences.h b/lib/zstd/compress/zstd_compress_sequences.h -index 7991364c2f71..7fe6f4ff5cf2 100644 +index 7991364c2f71f..7fe6f4ff5cf25 100644 --- a/lib/zstd/compress/zstd_compress_sequences.h +++ b/lib/zstd/compress/zstd_compress_sequences.h @@ -1,5 +1,6 @@ @@ -18631,7 +19297,7 @@ index 7991364c2f71..7fe6f4ff5cf2 100644 * * This source code is licensed under both the BSD-style license (found in the diff --git a/lib/zstd/compress/zstd_compress_superblock.c b/lib/zstd/compress/zstd_compress_superblock.c -index 17d836cc84e8..dbacbaf72733 100644 +index 17d836cc84e8f..dbacbaf727338 100644 --- a/lib/zstd/compress/zstd_compress_superblock.c +++ b/lib/zstd/compress/zstd_compress_superblock.c @@ -1,5 +1,6 @@ @@ -18730,7 +19396,7 @@ index 17d836cc84e8..dbacbaf72733 100644 ZSTD_memcpy(nextCBlock->rep, &rep, sizeof(rep)); } diff --git a/lib/zstd/compress/zstd_compress_superblock.h b/lib/zstd/compress/zstd_compress_superblock.h -index 224ece79546e..826bbc9e029b 100644 +index 224ece79546eb..826bbc9e029b1 100644 --- a/lib/zstd/compress/zstd_compress_superblock.h +++ b/lib/zstd/compress/zstd_compress_superblock.h @@ -1,5 +1,6 @@ @@ -18742,7 +19408,7 @@ index 224ece79546e..826bbc9e029b 100644 * * This source code is licensed under both the BSD-style license (found in the diff --git a/lib/zstd/compress/zstd_cwksp.h b/lib/zstd/compress/zstd_cwksp.h -index 349fc923c355..65ea53b62844 100644 +index 349fc923c355a..65ea53b628447 100644 --- a/lib/zstd/compress/zstd_cwksp.h +++ b/lib/zstd/compress/zstd_cwksp.h @@ -1,5 +1,6 @@ @@ -19047,7 +19713,7 @@ index 349fc923c355..65ea53b62844 100644 diff --git a/lib/zstd/compress/zstd_double_fast.c b/lib/zstd/compress/zstd_double_fast.c -index 76933dea2624..ab9440a99603 100644 +index 76933dea2624e..ab9440a996039 100644 --- a/lib/zstd/compress/zstd_double_fast.c +++ b/lib/zstd/compress/zstd_double_fast.c @@ -1,5 +1,6 @@ @@ -19360,7 +20026,7 @@ index 76933dea2624..ab9440a99603 100644 hashLong[ZSTD_hashPtr(ip, hBitsL, 8)] = current2; ip += repLength2; diff --git a/lib/zstd/compress/zstd_double_fast.h b/lib/zstd/compress/zstd_double_fast.h -index 6822bde65a1d..0204f12e4cf7 100644 +index 6822bde65a1d8..0204f12e4cf70 100644 --- a/lib/zstd/compress/zstd_double_fast.h +++ b/lib/zstd/compress/zstd_double_fast.h @@ -1,5 +1,6 @@ @@ -19382,7 +20048,7 @@ index 6822bde65a1d..0204f12e4cf7 100644 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], void const* src, size_t srcSize); diff --git a/lib/zstd/compress/zstd_fast.c b/lib/zstd/compress/zstd_fast.c -index a752e6beab52..3399b39c5dbc 100644 +index a752e6beab52e..3399b39c5dbc5 100644 --- a/lib/zstd/compress/zstd_fast.c +++ b/lib/zstd/compress/zstd_fast.c @@ -1,5 +1,6 @@ @@ -20165,7 +20831,7 @@ index a752e6beab52..3399b39c5dbc 100644 { default: /* includes case 3 */ diff --git a/lib/zstd/compress/zstd_fast.h b/lib/zstd/compress/zstd_fast.h -index fddc2f532d21..e64d9e1b2d39 100644 +index fddc2f532d21d..e64d9e1b2d393 100644 --- a/lib/zstd/compress/zstd_fast.h +++ b/lib/zstd/compress/zstd_fast.h @@ -1,5 +1,6 @@ @@ -20187,7 +20853,7 @@ index fddc2f532d21..e64d9e1b2d39 100644 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], void const* src, size_t srcSize); diff --git a/lib/zstd/compress/zstd_lazy.c b/lib/zstd/compress/zstd_lazy.c -index 0298a01a7504..f6b4978ceba7 100644 +index 0298a01a7504a..f6b4978ceba7f 100644 --- a/lib/zstd/compress/zstd_lazy.c +++ b/lib/zstd/compress/zstd_lazy.c @@ -1,5 +1,6 @@ @@ -21250,7 +21916,7 @@ index 0298a01a7504..f6b4978ceba7 100644 return ZSTD_compressBlock_lazy_extDict_generic(ms, seqStore, rep, src, srcSize, search_rowHash, 2); } diff --git a/lib/zstd/compress/zstd_lazy.h b/lib/zstd/compress/zstd_lazy.h -index e5bdf4df8dde..9505bed93c03 100644 +index e5bdf4df8dde0..9505bed93c031 100644 --- a/lib/zstd/compress/zstd_lazy.h +++ b/lib/zstd/compress/zstd_lazy.h @@ -1,5 +1,6 @@ @@ -21280,7 +21946,7 @@ index e5bdf4df8dde..9505bed93c03 100644 #endif /* ZSTD_LAZY_H */ diff --git a/lib/zstd/compress/zstd_ldm.c b/lib/zstd/compress/zstd_ldm.c -index dd86fc83e7dd..b7da76b0db7c 100644 +index dd86fc83e7dde..b7da76b0db7c4 100644 --- a/lib/zstd/compress/zstd_ldm.c +++ b/lib/zstd/compress/zstd_ldm.c @@ -1,5 +1,6 @@ @@ -21324,7 +21990,7 @@ index dd86fc83e7dd..b7da76b0db7c 100644 ip += sequence.matchLength; } diff --git a/lib/zstd/compress/zstd_ldm.h b/lib/zstd/compress/zstd_ldm.h -index fbc6a5e88fd7..c540731abde7 100644 +index fbc6a5e88fd7a..c540731abde72 100644 --- a/lib/zstd/compress/zstd_ldm.h +++ b/lib/zstd/compress/zstd_ldm.h @@ -1,5 +1,6 @@ @@ -21336,7 +22002,7 @@ index fbc6a5e88fd7..c540731abde7 100644 * * This source code is licensed under both the BSD-style license (found in the diff --git a/lib/zstd/compress/zstd_ldm_geartab.h b/lib/zstd/compress/zstd_ldm_geartab.h -index 647f865be290..cfccfc46f6f7 100644 +index 647f865be2903..cfccfc46f6f7b 100644 --- a/lib/zstd/compress/zstd_ldm_geartab.h +++ b/lib/zstd/compress/zstd_ldm_geartab.h @@ -1,5 +1,6 @@ @@ -21348,7 +22014,7 @@ index 647f865be290..cfccfc46f6f7 100644 * * This source code is licensed under both the BSD-style license (found in the diff --git a/lib/zstd/compress/zstd_opt.c b/lib/zstd/compress/zstd_opt.c -index fd82acfda62f..1e41cb04f482 100644 +index fd82acfda62f6..1e41cb04f4820 100644 --- a/lib/zstd/compress/zstd_opt.c +++ b/lib/zstd/compress/zstd_opt.c @@ -1,5 +1,6 @@ @@ -21830,7 +22496,7 @@ index fd82acfda62f..1e41cb04f482 100644 ZSTD_initStats_ultra(ms, seqStore, rep, src, srcSize); } diff --git a/lib/zstd/compress/zstd_opt.h b/lib/zstd/compress/zstd_opt.h -index 22b862858ba7..faa73ff4b03d 100644 +index 22b862858ba7a..faa73ff4b03dc 100644 --- a/lib/zstd/compress/zstd_opt.h +++ b/lib/zstd/compress/zstd_opt.h @@ -1,5 +1,6 @@ @@ -21842,7 +22508,7 @@ index 22b862858ba7..faa73ff4b03d 100644 * * This source code is licensed under both the BSD-style license (found in the diff --git a/lib/zstd/decompress/huf_decompress.c b/lib/zstd/decompress/huf_decompress.c -index 60958afebc41..d172e35fbd9a 100644 +index 60958afebc415..d172e35fbd9a6 100644 --- a/lib/zstd/decompress/huf_decompress.c +++ b/lib/zstd/decompress/huf_decompress.c @@ -1,7 +1,8 @@ @@ -23033,7 +23699,7 @@ index 60958afebc41..d172e35fbd9a 100644 } - diff --git a/lib/zstd/decompress/zstd_ddict.c b/lib/zstd/decompress/zstd_ddict.c -index dbbc7919de53..30ef65e1ab5c 100644 +index dbbc7919de534..30ef65e1ab5ca 100644 --- a/lib/zstd/decompress/zstd_ddict.c +++ b/lib/zstd/decompress/zstd_ddict.c @@ -1,5 +1,6 @@ @@ -23075,7 +23741,7 @@ index dbbc7919de53..30ef65e1ab5c 100644 + return ddict->dictID; } diff --git a/lib/zstd/decompress/zstd_ddict.h b/lib/zstd/decompress/zstd_ddict.h -index 8c1a79d666f8..de459a0dacd1 100644 +index 8c1a79d666f89..de459a0dacd19 100644 --- a/lib/zstd/decompress/zstd_ddict.h +++ b/lib/zstd/decompress/zstd_ddict.h @@ -1,5 +1,6 @@ @@ -23087,7 +23753,7 @@ index 8c1a79d666f8..de459a0dacd1 100644 * * This source code is licensed under both the BSD-style license (found in the diff --git a/lib/zstd/decompress/zstd_decompress.c b/lib/zstd/decompress/zstd_decompress.c -index 6b3177c94711..03dbdf39109f 100644 +index 6b3177c947114..03dbdf39109f9 100644 --- a/lib/zstd/decompress/zstd_decompress.c +++ b/lib/zstd/decompress/zstd_decompress.c @@ -1,5 +1,6 @@ @@ -23644,7 +24310,7 @@ index 6b3177c94711..03dbdf39109f 100644 + } } diff --git a/lib/zstd/decompress/zstd_decompress_block.c b/lib/zstd/decompress/zstd_decompress_block.c -index c1913b8e7c89..9f5577e5bc19 100644 +index c1913b8e7c897..9f5577e5bc19d 100644 --- a/lib/zstd/decompress/zstd_decompress_block.c +++ b/lib/zstd/decompress/zstd_decompress_block.c @@ -1,5 +1,6 @@ @@ -24181,7 +24847,7 @@ index c1913b8e7c89..9f5577e5bc19 100644 + return ZSTD_decompressBlock_deprecated(dctx, dst, dstCapacity, src, srcSize); +} diff --git a/lib/zstd/decompress/zstd_decompress_block.h b/lib/zstd/decompress/zstd_decompress_block.h -index 3d2d57a5d25a..5888e6cc788b 100644 +index 3d2d57a5d25a7..5888e6cc788b5 100644 --- a/lib/zstd/decompress/zstd_decompress_block.h +++ b/lib/zstd/decompress/zstd_decompress_block.h @@ -1,5 +1,6 @@ @@ -24204,7 +24870,7 @@ index 3d2d57a5d25a..5888e6cc788b 100644 #endif /* ZSTD_DEC_BLOCK_H */ diff --git a/lib/zstd/decompress/zstd_decompress_internal.h b/lib/zstd/decompress/zstd_decompress_internal.h -index 98102edb6a83..32f79fb2873d 100644 +index 98102edb6a832..32f79fb2873df 100644 --- a/lib/zstd/decompress/zstd_decompress_internal.h +++ b/lib/zstd/decompress/zstd_decompress_internal.h @@ -1,5 +1,6 @@ @@ -24239,7 +24905,7 @@ index 98102edb6a83..32f79fb2873d 100644 /* streaming */ ZSTD_dStreamStage streamStage; diff --git a/lib/zstd/decompress_sources.h b/lib/zstd/decompress_sources.h -index a06ca187aab5..8a47eb2a4514 100644 +index a06ca187aab5f..8a47eb2a45145 100644 --- a/lib/zstd/decompress_sources.h +++ b/lib/zstd/decompress_sources.h @@ -1,6 +1,6 @@ @@ -24251,7 +24917,7 @@ index a06ca187aab5..8a47eb2a4514 100644 * * This source code is licensed under both the BSD-style license (found in the diff --git a/lib/zstd/zstd_common_module.c b/lib/zstd/zstd_common_module.c -index 22686e367e6f..466828e35752 100644 +index 22686e367e6f0..466828e357525 100644 --- a/lib/zstd/zstd_common_module.c +++ b/lib/zstd/zstd_common_module.c @@ -1,6 +1,6 @@ @@ -24273,7 +24939,7 @@ index 22686e367e6f..466828e35752 100644 MODULE_LICENSE("Dual BSD/GPL"); MODULE_DESCRIPTION("Zstd Common"); diff --git a/lib/zstd/zstd_compress_module.c b/lib/zstd/zstd_compress_module.c -index 04e1b5c01d9b..8ecf43226af2 100644 +index 04e1b5c01d9b6..8ecf43226af2f 100644 --- a/lib/zstd/zstd_compress_module.c +++ b/lib/zstd/zstd_compress_module.c @@ -1,6 +1,6 @@ @@ -24285,7 +24951,7 @@ index 04e1b5c01d9b..8ecf43226af2 100644 * * This source code is licensed under both the BSD-style license (found in the diff --git a/lib/zstd/zstd_decompress_module.c b/lib/zstd/zstd_decompress_module.c -index f4ed952ed485..eb1c49e69722 100644 +index f4ed952ed4852..eb1c49e69722f 100644 --- a/lib/zstd/zstd_decompress_module.c +++ b/lib/zstd/zstd_decompress_module.c @@ -1,6 +1,6 @@ diff --git a/patches/0002-eevdf.patch b/patches/0002-eevdf.patch index 363a80d..bcda337 100644 --- a/patches/0002-eevdf.patch +++ b/patches/0002-eevdf.patch @@ -1,7 +1,7 @@ -From 218c51e49185b75b4e36c8f11b5c77686f955a0a Mon Sep 17 00:00:00 2001 +From 6d15f875cb0c7fd65fc422c0545d57fc2e124f7c Mon Sep 17 00:00:00 2001 From: Peter Jung -Date: Sun, 30 Jul 2023 09:38:51 +0200 -Subject: [PATCH] EEVDF +Date: Sun, 20 Aug 2023 15:56:13 +0200 +Subject: [PATCH] EEVDF-cachy Signed-off-by: Peter Jung --- @@ -13,14 +13,14 @@ Signed-off-by: Peter Jung init/init_task.c | 3 +- kernel/sched/core.c | 65 +- kernel/sched/debug.c | 49 +- - kernel/sched/fair.c | 1138 +++++++++++------------ - kernel/sched/features.h | 23 +- + kernel/sched/fair.c | 1150 +++++++++++------------ + kernel/sched/features.h | 24 +- kernel/sched/sched.h | 21 +- tools/include/uapi/linux/sched.h | 4 +- - 12 files changed, 702 insertions(+), 668 deletions(-) + 12 files changed, 715 insertions(+), 668 deletions(-) diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst -index 4ef890191196..3a8d3e1e5591 100644 +index 4ef8901911961..3a8d3e1e55910 100644 --- a/Documentation/admin-guide/cgroup-v2.rst +++ b/Documentation/admin-guide/cgroup-v2.rst @@ -1121,6 +1121,16 @@ All time durations are in microseconds. @@ -41,7 +41,7 @@ index 4ef890191196..3a8d3e1e5591 100644 Memory diff --git a/include/linux/rbtree_augmented.h b/include/linux/rbtree_augmented.h -index 7ee7ed5de722..6dbc5a1bf6a8 100644 +index 7ee7ed5de7227..6dbc5a1bf6a8c 100644 --- a/include/linux/rbtree_augmented.h +++ b/include/linux/rbtree_augmented.h @@ -60,6 +60,32 @@ rb_insert_augmented_cached(struct rb_node *node, @@ -78,7 +78,7 @@ index 7ee7ed5de722..6dbc5a1bf6a8 100644 * Template for declaring augmented rbtree callbacks (generic case) * diff --git a/include/linux/sched.h b/include/linux/sched.h -index 609bde814cb0..c940c4dc8304 100644 +index 609bde814cb06..c940c4dc83048 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -549,13 +549,18 @@ struct sched_entity { @@ -110,7 +110,7 @@ index 609bde814cb0..c940c4dc8304 100644 struct sched_entity se; struct sched_rt_entity rt; diff --git a/include/uapi/linux/sched.h b/include/uapi/linux/sched.h -index 3bac0a8ceab2..b2e932c25be6 100644 +index 3bac0a8ceab26..b2e932c25be62 100644 --- a/include/uapi/linux/sched.h +++ b/include/uapi/linux/sched.h @@ -132,6 +132,7 @@ struct clone_args { @@ -131,7 +131,7 @@ index 3bac0a8ceab2..b2e932c25be6 100644 #endif /* _UAPI_LINUX_SCHED_H */ diff --git a/include/uapi/linux/sched/types.h b/include/uapi/linux/sched/types.h -index f2c4589d4dbf..db1e8199e8c8 100644 +index f2c4589d4dbfe..db1e8199e8c80 100644 --- a/include/uapi/linux/sched/types.h +++ b/include/uapi/linux/sched/types.h @@ -10,6 +10,7 @@ struct sched_param { @@ -175,7 +175,7 @@ index f2c4589d4dbf..db1e8199e8c8 100644 #endif /* _UAPI_LINUX_SCHED_TYPES_H */ diff --git a/init/init_task.c b/init/init_task.c -index ff6c4b9bfe6b..511cbcf3510d 100644 +index ff6c4b9bfe6b1..511cbcf3510dc 100644 --- a/init/init_task.c +++ b/init/init_task.c @@ -78,6 +78,7 @@ struct task_struct init_task @@ -196,7 +196,7 @@ index ff6c4b9bfe6b..511cbcf3510d 100644 .rt = { .run_list = LIST_HEAD_INIT(init_task.rt.run_list), diff --git a/kernel/sched/core.c b/kernel/sched/core.c -index c52c2eba7c73..aff81e12460e 100644 +index c52c2eba7c739..aff81e12460ed 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -1305,6 +1305,12 @@ static void set_load_weight(struct task_struct *p, bool update_load) @@ -358,7 +358,7 @@ index c52c2eba7c73..aff81e12460e 100644 #ifdef CONFIG_CFS_BANDWIDTH { diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c -index 066ff1c8ae4e..e7e83181fbb6 100644 +index 066ff1c8ae4eb..e7e83181fbb6c 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@ -347,10 +347,7 @@ static __init int sched_init_debug(void) @@ -462,7 +462,7 @@ index 066ff1c8ae4e..e7e83181fbb6 100644 P(dl.runtime); P(dl.deadline); diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c -index 2c335df30171..461409c0eac7 100644 +index 2c335df301718..e0a4c13dab04f 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -47,6 +47,7 @@ @@ -868,7 +868,7 @@ index 2c335df30171..461409c0eac7 100644 } struct sched_entity *__pick_first_entity(struct cfs_rq *cfs_rq) -@@ -678,14 +845,81 @@ struct sched_entity *__pick_first_entity(struct cfs_rq *cfs_rq) +@@ -678,14 +845,88 @@ struct sched_entity *__pick_first_entity(struct cfs_rq *cfs_rq) return __node_2_se(left); } @@ -904,6 +904,13 @@ index 2c335df30171..461409c0eac7 100644 + if (curr && (!curr->on_rq || !entity_eligible(cfs_rq, curr))) + curr = NULL; + ++ /* ++ * Once selected, run a task until it either becomes non-eligible or ++ * until it gets a new slice. See the HACK in set_next_entity(). ++ */ ++ if (sched_feat(RUN_TO_PARITY) && curr && curr->vlag == curr->deadline) ++ return curr; ++ + while (node) { + struct sched_entity *se = __node_2_se(node); + @@ -938,8 +945,7 @@ index 2c335df30171..461409c0eac7 100644 + + node = node->rb_right; + } - -- return __node_2_se(next); ++ + if (!best || (curr && deadline_gt(deadline, best, curr))) + best = curr; + @@ -950,12 +956,13 @@ index 2c335df30171..461409c0eac7 100644 + return left; + } + } -+ + +- return __node_2_se(next); + return best; } #ifdef CONFIG_SCHED_DEBUG -@@ -707,104 +941,53 @@ int sched_update_scaling(void) +@@ -707,104 +948,53 @@ int sched_update_scaling(void) { unsigned int factor = get_update_sysctl_factor(); @@ -982,12 +989,12 @@ index 2c335df30171..461409c0eac7 100644 { - if (unlikely(se->load.weight != NICE_0_LOAD)) - delta = __calc_delta(delta, NICE_0_LOAD, &se->load); -- -- return delta; --} + u32 weight = sched_prio_to_weight[prio]; + u64 base = sysctl_sched_base_slice; +- return delta; +-} +- -/* - * The idea is to set a period in which each task runs once. - * @@ -1088,7 +1095,7 @@ index 2c335df30171..461409c0eac7 100644 } #include "pelt.h" -@@ -939,6 +1122,7 @@ static void update_curr(struct cfs_rq *cfs_rq) +@@ -939,6 +1129,7 @@ static void update_curr(struct cfs_rq *cfs_rq) schedstat_add(cfs_rq->exec_clock, delta_exec); curr->vruntime += calc_delta_fair(delta_exec, curr); @@ -1096,7 +1103,7 @@ index 2c335df30171..461409c0eac7 100644 update_min_vruntime(cfs_rq); if (entity_is_task(curr)) { -@@ -3393,16 +3577,36 @@ dequeue_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *se) { } +@@ -3393,16 +3584,36 @@ dequeue_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *se) { } static void reweight_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, unsigned long weight) { @@ -1133,7 +1140,7 @@ index 2c335df30171..461409c0eac7 100644 #ifdef CONFIG_SMP do { u32 divider = get_pelt_divider(&se->avg); -@@ -3412,9 +3616,11 @@ static void reweight_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, +@@ -3412,9 +3623,11 @@ static void reweight_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, #endif enqueue_load_avg(cfs_rq, se); @@ -1147,7 +1154,7 @@ index 2c335df30171..461409c0eac7 100644 } void reweight_task(struct task_struct *p, int prio) -@@ -4710,158 +4916,123 @@ static inline void update_misfit_status(struct task_struct *p, struct rq *rq) {} +@@ -4710,158 +4923,123 @@ static inline void update_misfit_status(struct task_struct *p, struct rq *rq) {} #endif /* CONFIG_SMP */ @@ -1170,15 +1177,15 @@ index 2c335df30171..461409c0eac7 100644 { - struct cfs_rq *cfs_rq; - u64 sleep_time; -- -- if (se->exec_start == 0) -- return false; -- -- cfs_rq = cfs_rq_of(se); + u64 vslice = calc_delta_fair(se->slice, se); + u64 vruntime = avg_vruntime(cfs_rq); + s64 lag = 0; +- if (se->exec_start == 0) +- return false; +- +- cfs_rq = cfs_rq_of(se); +- - sleep_time = rq_clock_task(rq_of(cfs_rq)); + /* + * Due to how V is constructed as the weighted average of entities, @@ -1395,7 +1402,7 @@ index 2c335df30171..461409c0eac7 100644 /* * When enqueuing a sched_entity, we must: * - Update loads to have both entity and cfs_rq synced with now. -@@ -4873,18 +5044,28 @@ enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) +@@ -4873,18 +5051,28 @@ enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) */ update_load_avg(cfs_rq, se, UPDATE_TG | DO_ATTACH); se_update_runnable(se); @@ -1427,7 +1434,7 @@ index 2c335df30171..461409c0eac7 100644 if (!curr) __enqueue_entity(cfs_rq, se); se->on_rq = 1; -@@ -4896,17 +5077,6 @@ enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) +@@ -4896,17 +5084,6 @@ enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) } } @@ -1445,7 +1452,7 @@ index 2c335df30171..461409c0eac7 100644 static void __clear_buddies_next(struct sched_entity *se) { for_each_sched_entity(se) { -@@ -4918,27 +5088,10 @@ static void __clear_buddies_next(struct sched_entity *se) +@@ -4918,27 +5095,10 @@ static void __clear_buddies_next(struct sched_entity *se) } } @@ -1473,7 +1480,7 @@ index 2c335df30171..461409c0eac7 100644 } static __always_inline void return_cfs_rq_runtime(struct cfs_rq *cfs_rq); -@@ -4972,20 +5125,12 @@ dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) +@@ -4972,20 +5132,12 @@ dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) clear_buddies(cfs_rq, se); @@ -1495,7 +1502,7 @@ index 2c335df30171..461409c0eac7 100644 /* return excess runtime on last dequeue */ return_cfs_rq_runtime(cfs_rq); -@@ -5004,52 +5149,6 @@ dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) +@@ -5004,52 +5156,6 @@ dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) update_idle_cfs_rq_clock_pelt(cfs_rq); } @@ -1548,7 +1555,19 @@ index 2c335df30171..461409c0eac7 100644 static void set_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *se) { -@@ -5088,9 +5187,6 @@ set_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *se) +@@ -5065,6 +5171,11 @@ set_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *se) + update_stats_wait_end_fair(cfs_rq, se); + __dequeue_entity(cfs_rq, se); + update_load_avg(cfs_rq, se, UPDATE_TG); ++ /* ++ * HACK, stash a copy of deadline at the point of pick in vlag, ++ * which isn't used until dequeue. ++ */ ++ se->vlag = se->deadline; + } + + update_stats_curr_start(cfs_rq, se); +@@ -5088,9 +5199,6 @@ set_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *se) se->prev_sum_exec_runtime = se->sum_exec_runtime; } @@ -1558,30 +1577,33 @@ index 2c335df30171..461409c0eac7 100644 /* * Pick the next process, keeping these things in mind, in this order: * 1) keep things fair between processes/task groups -@@ -5101,50 +5197,14 @@ wakeup_preempt_entity(struct sched_entity *curr, struct sched_entity *se); +@@ -5101,50 +5209,14 @@ wakeup_preempt_entity(struct sched_entity *curr, struct sched_entity *se); static struct sched_entity * pick_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *curr) { - struct sched_entity *left = __pick_first_entity(cfs_rq); - struct sched_entity *se; - - /* +- /* - * If curr is set we have to see if its left of the leftmost entity - * still in the tree, provided there was anything in the tree at all. -+ * Enabling NEXT_BUDDY will affect latency but not fairness. - */ +- */ - if (!left || (curr && entity_before(curr, left))) - left = curr; - - se = left; /* ideally we run the leftmost entity */ - -- /* + /* - * Avoid running the skip buddy, if running something else can - * be done without getting too unfair. -- */ ++ * Enabling NEXT_BUDDY will affect latency but not fairness. + */ - if (cfs_rq->skip && cfs_rq->skip == se) { - struct sched_entity *second; -- ++ if (sched_feat(NEXT_BUDDY) && ++ cfs_rq->next && entity_eligible(cfs_rq, cfs_rq->next)) ++ return cfs_rq->next; + - if (se == curr) { - second = __pick_first_entity(cfs_rq); - } else { @@ -1589,10 +1611,7 @@ index 2c335df30171..461409c0eac7 100644 - if (!second || (curr && entity_before(curr, second))) - second = curr; - } -+ if (sched_feat(NEXT_BUDDY) && -+ cfs_rq->next && entity_eligible(cfs_rq, cfs_rq->next)) -+ return cfs_rq->next; - +- - if (second && wakeup_preempt_entity(second, left) < 1) - se = second; - } @@ -1614,7 +1633,7 @@ index 2c335df30171..461409c0eac7 100644 } static bool check_cfs_rq_runtime(struct cfs_rq *cfs_rq); -@@ -5161,8 +5221,6 @@ static void put_prev_entity(struct cfs_rq *cfs_rq, struct sched_entity *prev) +@@ -5161,8 +5233,6 @@ static void put_prev_entity(struct cfs_rq *cfs_rq, struct sched_entity *prev) /* throttle cfs_rqs exceeding runtime */ check_cfs_rq_runtime(cfs_rq); @@ -1623,7 +1642,7 @@ index 2c335df30171..461409c0eac7 100644 if (prev->on_rq) { update_stats_wait_start_fair(cfs_rq, prev); /* Put 'current' back into the tree. */ -@@ -5203,9 +5261,6 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued) +@@ -5203,9 +5273,6 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued) hrtimer_active(&rq_of(cfs_rq)->hrtick_timer)) return; #endif @@ -1633,7 +1652,7 @@ index 2c335df30171..461409c0eac7 100644 } -@@ -6228,13 +6283,12 @@ static inline void unthrottle_offline_cfs_rqs(struct rq *rq) {} +@@ -6228,13 +6295,12 @@ static inline void unthrottle_offline_cfs_rqs(struct rq *rq) {} static void hrtick_start_fair(struct rq *rq, struct task_struct *p) { struct sched_entity *se = &p->se; @@ -1648,7 +1667,7 @@ index 2c335df30171..461409c0eac7 100644 s64 delta = slice - ran; if (delta < 0) { -@@ -6258,8 +6312,7 @@ static void hrtick_update(struct rq *rq) +@@ -6258,8 +6324,7 @@ static void hrtick_update(struct rq *rq) if (!hrtick_enabled_fair(rq) || curr->sched_class != &fair_sched_class) return; @@ -1658,7 +1677,7 @@ index 2c335df30171..461409c0eac7 100644 } #else /* !CONFIG_SCHED_HRTICK */ static inline void -@@ -6300,17 +6353,6 @@ static int sched_idle_rq(struct rq *rq) +@@ -6300,17 +6365,6 @@ static int sched_idle_rq(struct rq *rq) rq->nr_running); } @@ -1676,7 +1695,7 @@ index 2c335df30171..461409c0eac7 100644 #ifdef CONFIG_SMP static int sched_idle_cpu(int cpu) { -@@ -7816,18 +7858,6 @@ static void migrate_task_rq_fair(struct task_struct *p, int new_cpu) +@@ -7816,18 +7870,6 @@ static void migrate_task_rq_fair(struct task_struct *p, int new_cpu) { struct sched_entity *se = &p->se; @@ -1695,7 +1714,7 @@ index 2c335df30171..461409c0eac7 100644 if (!task_on_rq_migrating(p)) { remove_entity_load_avg(se); -@@ -7865,66 +7895,6 @@ balance_fair(struct rq *rq, struct task_struct *prev, struct rq_flags *rf) +@@ -7865,66 +7907,6 @@ balance_fair(struct rq *rq, struct task_struct *prev, struct rq_flags *rf) } #endif /* CONFIG_SMP */ @@ -1762,7 +1781,7 @@ index 2c335df30171..461409c0eac7 100644 static void set_next_buddy(struct sched_entity *se) { for_each_sched_entity(se) { -@@ -7936,12 +7906,6 @@ static void set_next_buddy(struct sched_entity *se) +@@ -7936,12 +7918,6 @@ static void set_next_buddy(struct sched_entity *se) } } @@ -1775,7 +1794,7 @@ index 2c335df30171..461409c0eac7 100644 /* * Preempt the current task with a newly woken task if needed: */ -@@ -7950,7 +7914,6 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_ +@@ -7950,7 +7926,6 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_ struct task_struct *curr = rq->curr; struct sched_entity *se = &curr->se, *pse = &p->se; struct cfs_rq *cfs_rq = task_cfs_rq(curr); @@ -1783,7 +1802,7 @@ index 2c335df30171..461409c0eac7 100644 int next_buddy_marked = 0; int cse_is_idle, pse_is_idle; -@@ -7966,7 +7929,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_ +@@ -7966,7 +7941,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_ if (unlikely(throttled_hierarchy(cfs_rq_of(pse)))) return; @@ -1792,7 +1811,7 @@ index 2c335df30171..461409c0eac7 100644 set_next_buddy(pse); next_buddy_marked = 1; } -@@ -8011,35 +7974,19 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_ +@@ -8011,35 +7986,19 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_ if (cse_is_idle != pse_is_idle) return; @@ -1835,7 +1854,7 @@ index 2c335df30171..461409c0eac7 100644 } #ifdef CONFIG_SMP -@@ -8240,8 +8187,6 @@ static void put_prev_task_fair(struct rq *rq, struct task_struct *prev) +@@ -8240,8 +8199,6 @@ static void put_prev_task_fair(struct rq *rq, struct task_struct *prev) /* * sched_yield() is very simple @@ -1844,7 +1863,7 @@ index 2c335df30171..461409c0eac7 100644 */ static void yield_task_fair(struct rq *rq) { -@@ -8257,21 +8202,19 @@ static void yield_task_fair(struct rq *rq) +@@ -8257,21 +8214,19 @@ static void yield_task_fair(struct rq *rq) clear_buddies(cfs_rq, se); @@ -1878,7 +1897,7 @@ index 2c335df30171..461409c0eac7 100644 } static bool yield_to_task_fair(struct rq *rq, struct task_struct *p) -@@ -8514,8 +8457,7 @@ static int task_hot(struct task_struct *p, struct lb_env *env) +@@ -8514,8 +8469,7 @@ static int task_hot(struct task_struct *p, struct lb_env *env) * Buddy candidates are cache hot: */ if (sched_feat(CACHE_HOT_BUDDY) && env->dst_rq->nr_running && @@ -1888,7 +1907,7 @@ index 2c335df30171..461409c0eac7 100644 return 1; if (sysctl_sched_migration_cost == -1) -@@ -12025,8 +11967,8 @@ static void rq_offline_fair(struct rq *rq) +@@ -12025,8 +11979,8 @@ static void rq_offline_fair(struct rq *rq) static inline bool __entity_slice_used(struct sched_entity *se, int min_nr_tasks) { @@ -1898,7 +1917,7 @@ index 2c335df30171..461409c0eac7 100644 return (rtime * min_nr_tasks > slice); } -@@ -12182,8 +12124,8 @@ static void task_tick_fair(struct rq *rq, struct task_struct *curr, int queued) +@@ -12182,8 +12136,8 @@ static void task_tick_fair(struct rq *rq, struct task_struct *curr, int queued) */ static void task_fork_fair(struct task_struct *p) { @@ -1908,7 +1927,7 @@ index 2c335df30171..461409c0eac7 100644 struct rq *rq = this_rq(); struct rq_flags rf; -@@ -12192,22 +12134,9 @@ static void task_fork_fair(struct task_struct *p) +@@ -12192,22 +12146,9 @@ static void task_fork_fair(struct task_struct *p) cfs_rq = task_cfs_rq(current); curr = cfs_rq->curr; @@ -1933,7 +1952,7 @@ index 2c335df30171..461409c0eac7 100644 rq_unlock(rq, &rf); } -@@ -12236,34 +12165,6 @@ prio_changed_fair(struct rq *rq, struct task_struct *p, int oldprio) +@@ -12236,34 +12177,6 @@ prio_changed_fair(struct rq *rq, struct task_struct *p, int oldprio) check_preempt_curr(rq, p, 0); } @@ -1968,7 +1987,7 @@ index 2c335df30171..461409c0eac7 100644 #ifdef CONFIG_FAIR_GROUP_SCHED /* * Propagate the changes of the sched_entity across the tg tree to make it -@@ -12334,16 +12235,6 @@ static void attach_entity_cfs_rq(struct sched_entity *se) +@@ -12334,16 +12247,6 @@ static void attach_entity_cfs_rq(struct sched_entity *se) static void detach_task_cfs_rq(struct task_struct *p) { struct sched_entity *se = &p->se; @@ -1985,7 +2004,7 @@ index 2c335df30171..461409c0eac7 100644 detach_entity_cfs_rq(se); } -@@ -12351,12 +12242,8 @@ static void detach_task_cfs_rq(struct task_struct *p) +@@ -12351,12 +12254,8 @@ static void detach_task_cfs_rq(struct task_struct *p) static void attach_task_cfs_rq(struct task_struct *p) { struct sched_entity *se = &p->se; @@ -1998,7 +2017,7 @@ index 2c335df30171..461409c0eac7 100644 } static void switched_from_fair(struct rq *rq, struct task_struct *p) -@@ -12467,6 +12354,7 @@ int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent) +@@ -12467,6 +12366,7 @@ int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent) goto err; tg->shares = NICE_0_LOAD; @@ -2006,7 +2025,7 @@ index 2c335df30171..461409c0eac7 100644 init_cfs_bandwidth(tg_cfs_bandwidth(tg)); -@@ -12565,6 +12453,9 @@ void init_tg_cfs_entry(struct task_group *tg, struct cfs_rq *cfs_rq, +@@ -12565,6 +12465,9 @@ void init_tg_cfs_entry(struct task_group *tg, struct cfs_rq *cfs_rq, } se->my_q = cfs_rq; @@ -2016,7 +2035,7 @@ index 2c335df30171..461409c0eac7 100644 /* guarantee group entities always have weight */ update_load_set(&se->load, NICE_0_LOAD); se->parent = parent; -@@ -12695,6 +12586,29 @@ int sched_group_set_idle(struct task_group *tg, long idle) +@@ -12695,6 +12598,29 @@ int sched_group_set_idle(struct task_group *tg, long idle) return 0; } @@ -2046,7 +2065,7 @@ index 2c335df30171..461409c0eac7 100644 #else /* CONFIG_FAIR_GROUP_SCHED */ void free_fair_sched_group(struct task_group *tg) { } -@@ -12721,7 +12635,7 @@ static unsigned int get_rr_interval_fair(struct rq *rq, struct task_struct *task +@@ -12721,7 +12647,7 @@ static unsigned int get_rr_interval_fair(struct rq *rq, struct task_struct *task * idle runqueue: */ if (rq->cfs.load.weight) @@ -2056,10 +2075,10 @@ index 2c335df30171..461409c0eac7 100644 return rr_interval; } diff --git a/kernel/sched/features.h b/kernel/sched/features.h -index ee7f23c76bd3..54334ca5c5c6 100644 +index ee7f23c76bd33..546d212ef40d8 100644 --- a/kernel/sched/features.h +++ b/kernel/sched/features.h -@@ -1,16 +1,11 @@ +@@ -1,16 +1,12 @@ /* SPDX-License-Identifier: GPL-2.0 */ -/* - * Only give sleepers 50% of their service deficit. This allows @@ -2077,10 +2096,11 @@ index ee7f23c76bd3..54334ca5c5c6 100644 -SCHED_FEAT(START_DEBIT, true) +SCHED_FEAT(PLACE_LAG, true) +SCHED_FEAT(PLACE_DEADLINE_INITIAL, true) ++SCHED_FEAT(RUN_TO_PARITY, true) /* * Prefer to schedule the task we woke last (assuming it failed -@@ -19,13 +14,6 @@ SCHED_FEAT(START_DEBIT, true) +@@ -19,13 +15,6 @@ SCHED_FEAT(START_DEBIT, true) */ SCHED_FEAT(NEXT_BUDDY, false) @@ -2094,7 +2114,7 @@ index ee7f23c76bd3..54334ca5c5c6 100644 /* * Consider buddies to be cache hot, decreases the likeliness of a * cache buddy being migrated away, increases cache locality. -@@ -98,6 +86,3 @@ SCHED_FEAT(UTIL_EST, true) +@@ -98,6 +87,3 @@ SCHED_FEAT(UTIL_EST, true) SCHED_FEAT(UTIL_EST_FASTUP, true) SCHED_FEAT(LATENCY_WARN, false) @@ -2102,7 +2122,7 @@ index ee7f23c76bd3..54334ca5c5c6 100644 -SCHED_FEAT(ALT_PERIOD, true) -SCHED_FEAT(BASE_SLICE, true) diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h -index e93e006a942b..67cd7e1fd501 100644 +index e93e006a942b9..67cd7e1fd5016 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -372,6 +372,8 @@ struct task_group { @@ -2182,7 +2202,7 @@ index e93e006a942b..67cd7e1fd501 100644 + #endif /* _KERNEL_SCHED_SCHED_H */ diff --git a/tools/include/uapi/linux/sched.h b/tools/include/uapi/linux/sched.h -index 3bac0a8ceab2..b2e932c25be6 100644 +index 3bac0a8ceab26..b2e932c25be62 100644 --- a/tools/include/uapi/linux/sched.h +++ b/tools/include/uapi/linux/sched.h @@ -132,6 +132,7 @@ struct clone_args { diff --git a/patches/0002-eevdfbore.patch b/patches/0002-eevdfbore.patch index 0465cdf..f1133a7 100644 --- a/patches/0002-eevdfbore.patch +++ b/patches/0002-eevdfbore.patch @@ -1,51 +1,48 @@ -From 377657f92d256b364813e3f8b2a58edfc9833815 Mon Sep 17 00:00:00 2001 -From: Peter Jung -Date: Sun, 30 Jul 2023 09:43:51 +0200 +From f353b9eb23586e55b99a6bfe7da9563be5fcca29 Mon Sep 17 00:00:00 2001 +From: Piotr Gorski +Date: Sat, 12 Aug 2023 21:05:20 +0200 Subject: [PATCH] bore-eevdf -Signed-off-by: Peter Jung +Signed-off-by: Piotr Gorski --- - include/linux/sched.h | 30 ++++++ - init/Kconfig | 20 ++++ - kernel/sched/core.c | 118 +++++++++++++++++++++ - kernel/sched/debug.c | 4 + - kernel/sched/fair.c | 228 ++++++++++++++++++++++++++++++++++++++-- - kernel/sched/features.h | 4 + - kernel/sched/sched.h | 1 + - 7 files changed, 397 insertions(+), 8 deletions(-) + include/linux/sched.h | 29 ++++++ + init/Kconfig | 20 ++++ + kernel/sched/core.c | 122 +++++++++++++++++++++++ + kernel/sched/debug.c | 4 + + kernel/sched/fair.c | 219 +++++++++++++++++++++++++++++++++++++++--- + kernel/sched/sched.h | 1 + + 6 files changed, 384 insertions(+), 11 deletions(-) diff --git a/include/linux/sched.h b/include/linux/sched.h -index c940c4dc8304..8663c0813f81 100644 +index c940c4dc8..984931de0 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -545,6 +545,26 @@ struct sched_statistics { +@@ -545,6 +545,24 @@ struct sched_statistics { #endif /* CONFIG_SCHEDSTATS */ } ____cacheline_aligned; +#ifdef CONFIG_SCHED_BORE -+union union16 { ++typedef union { + u16 u16; + s16 s16; + u8 u8[2]; + s8 s8[2]; -+}; -+typedef union union16 x16; ++} x16; + -+union union32 { ++typedef union { + u32 u32; + s32 s32; + u16 u16[2]; + s16 s16[2]; + u8 u8[4]; + s8 s8[4]; -+}; -+typedef union union32 x32; ++} x32; +#endif // CONFIG_SCHED_BORE + struct sched_entity { /* For load-balancing: */ struct load_weight load; -@@ -559,6 +579,12 @@ struct sched_entity { +@@ -559,6 +577,12 @@ struct sched_entity { u64 sum_exec_runtime; u64 prev_sum_exec_runtime; u64 vruntime; @@ -58,19 +55,20 @@ index c940c4dc8304..8663c0813f81 100644 s64 vlag; u64 slice; -@@ -990,6 +1016,10 @@ struct task_struct { +@@ -990,6 +1014,11 @@ struct task_struct { struct list_head children; struct list_head sibling; struct task_struct *group_leader; +#ifdef CONFIG_SCHED_BORE + u16 child_burst_cache; ++ u16 child_burst_count_cache; + u64 child_burst_last_cached; +#endif // CONFIG_SCHED_BORE /* * 'ptraced' is the list of tasks this task is using ptrace() on. diff --git a/init/Kconfig b/init/Kconfig -index 71755cc8ed3e..c697be79e594 100644 +index 71755cc8e..c697be79e 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -1277,6 +1277,26 @@ config CHECKPOINT_RESTORE @@ -101,19 +99,21 @@ index 71755cc8ed3e..c697be79e594 100644 bool "Automatic process group scheduling" select CGROUPS diff --git a/kernel/sched/core.c b/kernel/sched/core.c -index aff81e12460e..839605620f63 100644 +index aff81e124..a4eba9e47 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -4491,6 +4491,113 @@ int wake_up_state(struct task_struct *p, unsigned int state) +@@ -4491,6 +4491,117 @@ int wake_up_state(struct task_struct *p, unsigned int state) return try_to_wake_up(p, state, 0); } +#ifdef CONFIG_SCHED_BORE +extern unsigned int sched_burst_cache_lifetime; ++extern unsigned int sched_bore; +extern unsigned int sched_burst_fork_atavistic; + +void __init sched_init_bore(void) { + init_task.child_burst_cache = 0; ++ init_task.child_burst_count_cache = 0; + init_task.child_burst_last_cached = 0; + init_task.se.burst_time = 0; + init_task.se.prev_burst_penalty = 0; @@ -123,6 +123,7 @@ index aff81e12460e..839605620f63 100644 + +void inline sched_fork_bore(struct task_struct *p) { + p->child_burst_cache = 0; ++ p->child_burst_count_cache = 0; + p->child_burst_last_cached = 0; + p->se.burst_time = 0; + p->se.curr_burst_penalty = 0; @@ -144,6 +145,7 @@ index aff81e12460e..839605620f63 100644 + u16 avg = 0; + if (cnt) avg = DIV_ROUND_CLOSEST(sum, cnt); + p->child_burst_cache = max(avg, p->se.burst_penalty); ++ p->child_burst_count_cache = cnt; + p->child_burst_last_cached = now; +} + @@ -178,8 +180,8 @@ index aff81e12460e..839605620f63 100644 + if (child_burst_cache_expired(dec, now)) + update_child_burst_cache_atavistic(dec, now, depth - 1, &cnt, &sum); + else { -+ cnt += dcnt; -+ sum += (dec->child_burst_cache) * dcnt; ++ cnt += dec->child_burst_count_cache; ++ sum += (u32)dec->child_burst_cache * dec->child_burst_count_cache; + } + } + } @@ -198,7 +200,7 @@ index aff81e12460e..839605620f63 100644 + + read_lock(&tasklist_lock); + -+ if (sched_burst_fork_atavistic) { ++ if (likely(sched_bore) && likely(sched_burst_fork_atavistic)) { + while ((anc->real_parent != anc) && (count_child_tasks(anc) == 1)) + anc = anc->real_parent; + if (child_burst_cache_expired(anc, now)) @@ -218,7 +220,7 @@ index aff81e12460e..839605620f63 100644 /* * Perform scheduler related setup for a newly forked process p. * p is forked by current. -@@ -4507,6 +4614,9 @@ static void __sched_fork(unsigned long clone_flags, struct task_struct *p) +@@ -4507,6 +4618,9 @@ static void __sched_fork(unsigned long clone_flags, struct task_struct *p) p->se.prev_sum_exec_runtime = 0; p->se.nr_migrations = 0; p->se.vruntime = 0; @@ -228,7 +230,7 @@ index aff81e12460e..839605620f63 100644 p->se.vlag = 0; INIT_LIST_HEAD(&p->se.group_node); -@@ -4828,6 +4938,9 @@ void sched_cgroup_fork(struct task_struct *p, struct kernel_clone_args *kargs) +@@ -4828,6 +4942,9 @@ void sched_cgroup_fork(struct task_struct *p, struct kernel_clone_args *kargs) void sched_post_fork(struct task_struct *p) { @@ -238,20 +240,20 @@ index aff81e12460e..839605620f63 100644 uclamp_post_fork(p); } -@@ -9954,6 +10067,11 @@ void __init sched_init(void) +@@ -9954,6 +10071,11 @@ void __init sched_init(void) BUG_ON(&dl_sched_class != &stop_sched_class + 1); #endif +#ifdef CONFIG_SCHED_BORE + sched_init_bore(); -+ printk(KERN_INFO "BORE (Burst-Oriented Response Enhancer) CPU Scheduler modification 3.0 Beta2 by Masahito Suzuki"); ++ printk(KERN_INFO "BORE (Burst-Oriented Response Enhancer) CPU Scheduler modification 3.1.2 by Masahito Suzuki"); +#endif // CONFIG_SCHED_BORE + wait_bit_init(); #ifdef CONFIG_FAIR_GROUP_SCHED diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c -index e7e83181fbb6..ff41a524c1ee 100644 +index e7e83181f..ff41a524c 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@ -348,6 +348,7 @@ static __init int sched_init_debug(void) @@ -273,7 +275,7 @@ index e7e83181fbb6..ff41a524c1ee 100644 SEQ_printf(m, " %d %d", task_node(p), task_numa_group_id(p)); #endif diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c -index 461409c0eac7..90ce27fb0a3f 100644 +index 461409c0e..1293fe037 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -19,6 +19,9 @@ @@ -309,7 +311,7 @@ index 461409c0eac7..90ce27fb0a3f 100644 /* * After fork, child runs first. If set to 0 (default) then -@@ -84,8 +87,93 @@ static unsigned int normalized_sysctl_sched_base_slice = 750000ULL; +@@ -84,8 +87,85 @@ static unsigned int normalized_sysctl_sched_base_slice = 750000ULL; */ unsigned int sysctl_sched_child_runs_first __read_mostly; @@ -330,8 +332,8 @@ index 461409c0eac7..90ce27fb0a3f 100644 +#ifdef CONFIG_SCHED_BORE +unsigned int __read_mostly sched_bore = 1; +unsigned int __read_mostly sched_burst_cache_lifetime = 60000000; -+unsigned int __read_mostly sched_burst_penalty_offset = 18; -+unsigned int __read_mostly sched_burst_penalty_scale = 1292; ++unsigned int __read_mostly sched_burst_penalty_offset = 22; ++unsigned int __read_mostly sched_burst_penalty_scale = 1366; +unsigned int __read_mostly sched_burst_smoothness_up = 1; +unsigned int __read_mostly sched_burst_smoothness_down = 0; +unsigned int __read_mostly sched_burst_fork_atavistic = 2; @@ -339,27 +341,22 @@ index 461409c0eac7..90ce27fb0a3f 100644 +static int sixty_four = 64; +static int maxval_12_bits = 4095; + -+#define MAX_BURST_PENALTY ((u32)(40UL << 8) - 1) ++#define MAX_BURST_PENALTY ((40U << 8) - 1) + +static inline u32 log2plus1_u64_u32f8(u64 v) { + x32 result; + int msb = fls64(v); -+ result.u8[0] = v << (64 - msb) >> 55; ++ int excess_bits = msb - 9; ++ result.u8[0] = (0 <= excess_bits)? v >> excess_bits: v << -excess_bits; + result.u8[1] = msb; + return result.u32; +} + -+static inline u32 u8h_u32(u8 v) { -+ x32 result; -+ result.u8[1] = v; -+ return result.u32; -+} -+ -+static inline u32 calc_burst_penalty(struct sched_entity *se) { ++static inline u32 calc_burst_penalty(u64 burst_time) { + u32 greed, tolerance, penalty, scaled_penalty; + -+ greed = log2plus1_u64_u32f8(se->burst_time); -+ tolerance = u8h_u32(sched_burst_penalty_offset); ++ greed = log2plus1_u64_u32f8(burst_time); ++ tolerance = sched_burst_penalty_offset << 8; + penalty = max(0, (s32)greed - (s32)tolerance); + scaled_penalty = penalty * sched_burst_penalty_scale >> 10; + @@ -367,19 +364,21 @@ index 461409c0eac7..90ce27fb0a3f 100644 +} + +static void update_burst_penalty(struct sched_entity *se) { -+ se->curr_burst_penalty = calc_burst_penalty(se); ++ se->curr_burst_penalty = calc_burst_penalty(se->burst_time); + se->burst_penalty = max(se->prev_burst_penalty, se->curr_burst_penalty); +} + -+static inline u64 penalty_scale(u64 delta, struct sched_entity *se) { -+ u8 score = ((x16*)&se->burst_penalty)->u8[1]; ++static inline u64 penalty_scale(u64 delta, struct sched_entity *se, bool half) { ++ u32 score = ((x16*)&se->burst_penalty)->u8[1]; ++ if (half) score >>= 1; + return mul_u64_u32_shr(delta, sched_prio_to_wmult[score], 22); +} + +static inline u32 binary_smooth(u32 new, u32 old) { -+ return (new >= old)? -+ old + ((new - old) >> sched_burst_smoothness_up): -+ old - ((old - new) >> sched_burst_smoothness_down); ++ int increment = new - old; ++ return (0 <= increment)? ++ old + ( increment >> sched_burst_smoothness_up): ++ old - (-increment >> sched_burst_smoothness_down); +} + +static void restart_burst(struct sched_entity *se) { @@ -389,21 +388,16 @@ index 461409c0eac7..90ce27fb0a3f 100644 + se->burst_time = 0; +} + -+#define calc_delta_fair(delta, se) __calc_delta_fair(delta, se, true) -+#define calc_delta_fair_unscaled(delta, se) __calc_delta_fair(delta, se, false) -+static inline u64 -+__calc_delta_fair(u64 delta, struct sched_entity *se, bool bscale); -+ -+static s64 wakeup_preempt_backstep_delta(u64 rtime, struct sched_entity *se) { -+ u64 delta = calc_delta_fair_unscaled(rtime, se); -+ return delta - penalty_scale(delta, se); ++static inline void vruntime_backstep(s64 *vdiff, struct sched_entity *se) { ++ u64 delta_exec = se->sum_exec_runtime - se->prev_sum_exec_runtime; ++ *vdiff += delta_exec - penalty_scale(delta_exec, se, false); +} +#endif // CONFIG_SCHED_BORE + int sched_thermal_decay_shift; static int __init setup_sched_thermal_decay_shift(char *str) { -@@ -145,6 +233,69 @@ static unsigned int sysctl_numa_balancing_promote_rate_limit = 65536; +@@ -145,6 +225,69 @@ static unsigned int sysctl_numa_balancing_promote_rate_limit = 65536; #ifdef CONFIG_SYSCTL static struct ctl_table sched_fair_sysctls[] = { @@ -473,7 +467,7 @@ index 461409c0eac7..90ce27fb0a3f 100644 { .procname = "sched_child_runs_first", .data = &sysctl_sched_child_runs_first, -@@ -238,6 +389,7 @@ static void update_sysctl(void) +@@ -238,6 +381,7 @@ static void update_sysctl(void) #define SET_SYSCTL(name) \ (sysctl_##name = (factor) * normalized_sysctl_##name) SET_SYSCTL(sched_base_slice); @@ -481,13 +475,14 @@ index 461409c0eac7..90ce27fb0a3f 100644 #undef SET_SYSCTL } -@@ -308,11 +460,19 @@ static u64 __calc_delta(u64 delta_exec, unsigned long weight, struct load_weight +@@ -308,11 +452,20 @@ static u64 __calc_delta(u64 delta_exec, unsigned long weight, struct load_weight /* * delta /= w */ +#ifdef CONFIG_SCHED_BORE -+static inline u64 -+__calc_delta_fair(u64 delta, struct sched_entity *se, bool bscale) ++#define calc_delta_fair_half(delta, se) __calc_delta_fair(delta, se, true) ++#define calc_delta_fair(delta, se) __calc_delta_fair(delta, se, false) ++static inline u64 __calc_delta_fair(u64 delta, struct sched_entity *se, bool half) +#else // CONFIG_SCHED_BORE static inline u64 calc_delta_fair(u64 delta, struct sched_entity *se) +#endif // CONFIG_SCHED_BORE @@ -496,24 +491,12 @@ index 461409c0eac7..90ce27fb0a3f 100644 delta = __calc_delta(delta, NICE_0_LOAD, &se->load); +#ifdef CONFIG_SCHED_BORE -+ if (bscale && likely(sched_bore)) delta = penalty_scale(delta, se); ++ if (likely(sched_bore)) delta = penalty_scale(delta, se, half); +#endif // CONFIG_SCHED_BORE return delta; } -@@ -706,7 +866,11 @@ void update_entity_lag(struct cfs_rq *cfs_rq, struct sched_entity *se) - SCHED_WARN_ON(!se->on_rq); - lag = avg_vruntime(cfs_rq) - se->vruntime; - -+#ifdef CONFIG_SCHED_BORE -+ limit = calc_delta_fair_unscaled(max_t(u64, 2*se->slice, TICK_NSEC), se); -+#else // CONFIG_SCHED_BORE - limit = calc_delta_fair(max_t(u64, 2*se->slice, TICK_NSEC), se); -+#endif // CONFIG_SCHED_BORE - se->vlag = clamp(lag, -limit, limit); - } - -@@ -944,6 +1108,7 @@ int sched_update_scaling(void) +@@ -944,6 +1097,7 @@ int sched_update_scaling(void) #define WRT_SYSCTL(name) \ (normalized_sysctl_##name = sysctl_##name / (factor)) WRT_SYSCTL(sched_base_slice); @@ -521,18 +504,29 @@ index 461409c0eac7..90ce27fb0a3f 100644 #undef WRT_SYSCTL return 0; -@@ -1121,6 +1286,10 @@ static void update_curr(struct cfs_rq *cfs_rq) +@@ -1121,7 +1275,11 @@ static void update_curr(struct cfs_rq *cfs_rq) curr->sum_exec_runtime += delta_exec; schedstat_add(cfs_rq->exec_clock, delta_exec); +- curr->vruntime += calc_delta_fair(delta_exec, curr); +#ifdef CONFIG_SCHED_BORE + curr->burst_time += delta_exec; + update_burst_penalty(curr); +#endif // CONFIG_SCHED_BORE - curr->vruntime += calc_delta_fair(delta_exec, curr); ++ curr->vruntime += max(1ULL, calc_delta_fair(delta_exec, curr)); update_deadline(cfs_rq, curr); update_min_vruntime(cfs_rq); -@@ -5187,6 +5356,9 @@ set_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *se) + +@@ -4919,7 +5077,7 @@ static inline void update_misfit_status(struct task_struct *p, struct rq *rq) {} + static void + place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) + { +- u64 vslice = calc_delta_fair(se->slice, se); ++ u64 vslice = calc_delta_fair_half(se->slice, se); + u64 vruntime = avg_vruntime(cfs_rq); + s64 lag = 0; + +@@ -5187,6 +5345,9 @@ set_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *se) se->prev_sum_exec_runtime = se->sum_exec_runtime; } @@ -542,7 +536,7 @@ index 461409c0eac7..90ce27fb0a3f 100644 /* * Pick the next process, keeping these things in mind, in this order: * 1) keep things fair between processes/task groups -@@ -5197,14 +5369,16 @@ set_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *se) +@@ -5197,14 +5358,16 @@ set_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *se) static struct sched_entity * pick_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *curr) { @@ -561,18 +555,14 @@ index 461409c0eac7..90ce27fb0a3f 100644 } static bool check_cfs_rq_runtime(struct cfs_rq *cfs_rq); -@@ -6452,6 +6626,38 @@ enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags) +@@ -6452,6 +6615,30 @@ enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags) hrtick_update(rq); } +static unsigned long wakeup_gran(struct sched_entity *se) +{ + unsigned long gran = sysctl_sched_wakeup_granularity; -+#ifdef CONFIG_SCHED_BORE -+ return calc_delta_fair_unscaled(gran, se); -+#else // CONFIG_SCHED_BORE + return calc_delta_fair(gran, se); -+#endif // CONFIG_SCHED_BORE +} + +static int @@ -580,11 +570,7 @@ index 461409c0eac7..90ce27fb0a3f 100644 +{ + s64 gran, vdiff = curr->vruntime - se->vruntime; +#ifdef CONFIG_SCHED_BORE -+ if (likely(sched_bore)) { -+ u64 rtime = curr->sum_exec_runtime - curr->prev_sum_exec_runtime; -+ vdiff += wakeup_preempt_backstep_delta(rtime, curr) -+ - wakeup_preempt_backstep_delta(rtime, se); -+ } ++ if (likely(sched_bore)) vruntime_backstep(&vdiff, curr); +#endif // CONFIG_SCHED_BORE + + if (vdiff <= 0) @@ -600,7 +586,7 @@ index 461409c0eac7..90ce27fb0a3f 100644 static void set_next_buddy(struct sched_entity *se); /* -@@ -6470,6 +6676,9 @@ static void dequeue_task_fair(struct rq *rq, struct task_struct *p, int flags) +@@ -6470,6 +6657,9 @@ static void dequeue_task_fair(struct rq *rq, struct task_struct *p, int flags) util_est_dequeue(&rq->cfs, p); for_each_sched_entity(se) { @@ -610,7 +596,7 @@ index 461409c0eac7..90ce27fb0a3f 100644 cfs_rq = cfs_rq_of(se); dequeue_entity(cfs_rq, se, flags); -@@ -7980,7 +8189,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_ +@@ -7980,7 +8170,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_ /* * XXX pick_eevdf(cfs_rq) != se ? */ @@ -619,34 +605,32 @@ index 461409c0eac7..90ce27fb0a3f 100644 goto preempt; return; -@@ -8193,6 +8402,9 @@ static void yield_task_fair(struct rq *rq) - struct task_struct *curr = rq->curr; - struct cfs_rq *cfs_rq = task_cfs_rq(curr); - struct sched_entity *se = &curr->se; +@@ -8197,8 +8387,12 @@ static void yield_task_fair(struct rq *rq) + /* + * Are we the only task in the tree? + */ +- if (unlikely(rq->nr_running == 1)) ++ if (unlikely(rq->nr_running == 1)) { ++#ifdef CONFIG_SCHED_BORE ++ restart_burst(se); ++#endif // CONFIG_SCHED_BORE + return; ++ } + + clear_buddies(cfs_rq, se); + +@@ -8207,6 +8401,9 @@ static void yield_task_fair(struct rq *rq) + * Update run-time statistics of the 'current'. + */ + update_curr(cfs_rq); +#ifdef CONFIG_SCHED_BORE + restart_burst(se); +#endif // CONFIG_SCHED_BORE - /* - * Are we the only task in the tree? -diff --git a/kernel/sched/features.h b/kernel/sched/features.h -index 54334ca5c5c6..416ec4bcdb0f 100644 ---- a/kernel/sched/features.h -+++ b/kernel/sched/features.h -@@ -12,7 +12,11 @@ SCHED_FEAT(PLACE_DEADLINE_INITIAL, true) - * wakeup-preemption), since its likely going to consume data we - * touched, increases cache locality. - */ -+#ifdef CONFIG_SCHED_BORE -+SCHED_FEAT(NEXT_BUDDY, true) -+#else // CONFIG_SCHED_BORE - SCHED_FEAT(NEXT_BUDDY, false) -+#endif // CONFIG_SCHED_BORE - - /* - * Consider buddies to be cache hot, decreases the likeliness of a + * Tell update_rq_clock() that we've just updated, + * so we don't do microscopic update in schedule() diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h -index 67cd7e1fd501..04d065015d6c 100644 +index 67cd7e1fd..04d065015 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -2506,6 +2506,7 @@ extern const_debug unsigned int sysctl_sched_nr_migrate; @@ -658,4 +642,4 @@ index 67cd7e1fd501..04d065015d6c 100644 #ifdef CONFIG_SCHED_DEBUG extern int sysctl_resched_latency_warn_ms; -- -2.41.0 +2.42.0.rc0.25.ga82fb66fed diff --git a/patches/0006-AMD-cppc.patch b/patches/0006-AMD-cppc.patch deleted file mode 100644 index eee57cc..0000000 --- a/patches/0006-AMD-cppc.patch +++ /dev/null @@ -1,573 +0,0 @@ -From ab6268d199fa749e274a48b00c443538ae492b16 Mon Sep 17 00:00:00 2001 -From: Piotr Gorski -Date: Wed, 9 Aug 2023 14:07:31 +0200 -Subject: [PATCH] amd-6.5: merge changes from dev tree - -Signed-off-by: Piotr Gorski ---- - .../admin-guide/kernel-parameters.txt | 5 + - Documentation/admin-guide/pm/amd-pstate.rst | 55 +++++ - drivers/acpi/cppc_acpi.c | 13 ++ - drivers/acpi/processor_driver.c | 6 + - drivers/cpufreq/amd-pstate.c | 191 ++++++++++++++++-- - drivers/cpufreq/cpufreq.c | 13 ++ - include/acpi/cppc_acpi.h | 5 + - include/linux/amd-pstate.h | 1 + - include/linux/cpufreq.h | 4 + - 9 files changed, 272 insertions(+), 21 deletions(-) - -diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt -index a1457995f..1f53c395a 100644 ---- a/Documentation/admin-guide/kernel-parameters.txt -+++ b/Documentation/admin-guide/kernel-parameters.txt -@@ -363,6 +363,11 @@ - selects a performance level in this range and appropriate - to the current workload. - -+ amd_prefcore= -+ [X86] -+ enable -+ Enable AMD Pstate Preferred Core. -+ - amijoy.map= [HW,JOY] Amiga joystick support - Map of devices attached to JOY0DAT and JOY1DAT - Format: , -diff --git a/Documentation/admin-guide/pm/amd-pstate.rst b/Documentation/admin-guide/pm/amd-pstate.rst -index 1cf40f692..4a30cf235 100644 ---- a/Documentation/admin-guide/pm/amd-pstate.rst -+++ b/Documentation/admin-guide/pm/amd-pstate.rst -@@ -353,6 +353,49 @@ is activated. In this mode, driver requests minimum and maximum performance - level and the platform autonomously selects a performance level in this range - and appropriate to the current workload. - -+AMD Pstate Preferred Core -+================================= -+ -+The core frequency is subjected to the process variation in semiconductors. -+Not all cores are able to reach the maximum frequency respecting the -+infrastructure limits. Consequently, AMD has redefined the concept of -+maximum frequency of a part. This means that a fraction of cores can reach -+maximum frequency. To find the best process scheduling policy for a given -+scenario, OS needs to know the core ordering informed by the platform through -+highest performance capability register of the CPPC interface. -+ -+``AMD Pstate Preferred Core`` use ITMT arch provides functions and data structures -+for enabling the scheduler to favor scheduling on cores can be get a higher frequency -+with lower voltage under preferred core. And it has the ability to dynamically -+change the preferred core based on the workload and platform conditions and -+accounting for thermals and aging. -+ -+The priority metric will be initialized by the AMD Pstate driver. The AMD Pstate -+driver will also determine whether or not ``AMD Pstate Preferred Core`` is -+supported by the platform. -+ -+AMD Pstate driver will provide an initial core ordering when the system boots. -+The platform uses the CPPC interfaces to communicate the core ranking to the -+operating system and scheduler to make sure that OS is choosing the cores -+with highest performance firstly for scheduling the process. When AMD Pstate -+driver receives a message with the highest performance change, it will -+update the core ranking and set the cpu's priority. -+ -+AMD Preferred Core Switch -+================================= -+Kernel Parameters -+----------------- -+ -+``AMD Pstate Preferred Core`` has two states: enable and disable. -+Enable/disable states can be chosen by different kernel parameters. -+Default disable ``AMD Pstate Preferred Core``. -+ -+``amd_prefcore=enable`` -+ -+If ``amd_prefcore=enable`` is passed to kernel command line option -+then enable ``AMD Pstate Preferred Core`` if the processor and power -+firmware can support preferred core feature. -+ - User Space Interface in ``sysfs`` - General - =========================================== - -@@ -385,6 +428,18 @@ control its functionality at the system level. They are located in the - to the operation mode represented by that string - or to be - unregistered in the "disable" case. - -+``prefcore_state`` -+ Preferred Core state of the driver: "enabled" or "disabled". -+ -+ "enabled" -+ Enable the AMD Preferred Core. -+ -+ "disabled" -+ Disable the AMD Preferred Core -+ -+ -+ This attribute is read-only to check the state of Preferred Core. -+ - ``cpupower`` tool support for ``amd-pstate`` - =============================================== - -diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c -index 7ff269a78..ad388a0e8 100644 ---- a/drivers/acpi/cppc_acpi.c -+++ b/drivers/acpi/cppc_acpi.c -@@ -1154,6 +1154,19 @@ int cppc_get_nominal_perf(int cpunum, u64 *nominal_perf) - return cppc_get_perf(cpunum, NOMINAL_PERF, nominal_perf); - } - -+/** -+ * cppc_get_highest_perf - Get the highest performance register value. -+ * @cpunum: CPU from which to get highest performance. -+ * @highest_perf: Return address. -+ * -+ * Return: 0 for success, -EIO otherwise. -+ */ -+int cppc_get_highest_perf(int cpunum, u64 *highest_perf) -+{ -+ return cppc_get_perf(cpunum, HIGHEST_PERF, highest_perf); -+} -+EXPORT_SYMBOL_GPL(cppc_get_highest_perf); -+ - /** - * cppc_get_epp_perf - Get the epp register value. - * @cpunum: CPU from which to get epp preference value. -diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c -index 4bd16b3f0..29b2fb68a 100644 ---- a/drivers/acpi/processor_driver.c -+++ b/drivers/acpi/processor_driver.c -@@ -27,6 +27,7 @@ - #define ACPI_PROCESSOR_NOTIFY_PERFORMANCE 0x80 - #define ACPI_PROCESSOR_NOTIFY_POWER 0x81 - #define ACPI_PROCESSOR_NOTIFY_THROTTLING 0x82 -+#define ACPI_PROCESSOR_NOTIFY_HIGEST_PERF_CHANGED 0x85 - - MODULE_AUTHOR("Paul Diefenbaugh"); - MODULE_DESCRIPTION("ACPI Processor Driver"); -@@ -83,6 +84,11 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data) - acpi_bus_generate_netlink_event(device->pnp.device_class, - dev_name(&device->dev), event, 0); - break; -+ case ACPI_PROCESSOR_NOTIFY_HIGEST_PERF_CHANGED: -+ cpufreq_update_highest_perf(pr->id); -+ acpi_bus_generate_netlink_event(device->pnp.device_class, -+ dev_name(&device->dev), event, 0); -+ break; - default: - acpi_handle_debug(handle, "Unsupported event [0x%x]\n", event); - break; -diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c -index 81fba0dcb..ba10aa971 100644 ---- a/drivers/cpufreq/amd-pstate.c -+++ b/drivers/cpufreq/amd-pstate.c -@@ -37,6 +37,7 @@ - #include - #include - #include -+#include - - #include - #include -@@ -49,6 +50,8 @@ - - #define AMD_PSTATE_TRANSITION_LATENCY 20000 - #define AMD_PSTATE_TRANSITION_DELAY 1000 -+#define AMD_PSTATE_PREFCORE_THRESHOLD 166 -+#define AMD_PSTATE_MAX_CPPC_PERF 255 - - /* - * TODO: We need more time to fine tune processors with shared memory solution -@@ -65,6 +68,14 @@ static struct cpufreq_driver amd_pstate_epp_driver; - static int cppc_state = AMD_PSTATE_UNDEFINED; - static bool cppc_enabled; - -+/* -+ * CPPC Preferred Core feature is supported by power firmware -+ */ -+static bool prefcore_enabled = false; -+ -+/* Disable AMD Pstate Preferred Core loading */ -+static bool no_prefcore __read_mostly = true; -+ - /* - * AMD Energy Preference Performance (EPP) - * The EPP is used in the CCLK DPM controller to drive -@@ -290,27 +301,26 @@ static inline int amd_pstate_enable(bool enable) - static int pstate_init_perf(struct amd_cpudata *cpudata) - { - u64 cap1; -- u32 highest_perf; - - int ret = rdmsrl_safe_on_cpu(cpudata->cpu, MSR_AMD_CPPC_CAP1, - &cap1); - if (ret) - return ret; - -- /* -- * TODO: Introduce AMD specific power feature. -- * -- * CPPC entry doesn't indicate the highest performance in some ASICs. -+ /* For platforms that do not support the preferred core feature, the -+ * highest_pef may be configured with 166 or 255, to avoid max frequency -+ * calculated wrongly. we take the AMD_CPPC_HIGHEST_PERF(cap1) value as -+ * the default max perf. - */ -- highest_perf = amd_get_highest_perf(); -- if (highest_perf > AMD_CPPC_HIGHEST_PERF(cap1)) -- highest_perf = AMD_CPPC_HIGHEST_PERF(cap1); -- -- WRITE_ONCE(cpudata->highest_perf, highest_perf); -+ if (!prefcore_enabled) -+ WRITE_ONCE(cpudata->highest_perf, AMD_CPPC_HIGHEST_PERF(cap1)); -+ else -+ WRITE_ONCE(cpudata->highest_perf, AMD_PSTATE_PREFCORE_THRESHOLD); - - WRITE_ONCE(cpudata->nominal_perf, AMD_CPPC_NOMINAL_PERF(cap1)); - WRITE_ONCE(cpudata->lowest_nonlinear_perf, AMD_CPPC_LOWNONLIN_PERF(cap1)); - WRITE_ONCE(cpudata->lowest_perf, AMD_CPPC_LOWEST_PERF(cap1)); -+ WRITE_ONCE(cpudata->prefcore_highest_perf, AMD_CPPC_HIGHEST_PERF(cap1)); - - return 0; - } -@@ -318,22 +328,21 @@ static int pstate_init_perf(struct amd_cpudata *cpudata) - static int cppc_init_perf(struct amd_cpudata *cpudata) - { - struct cppc_perf_caps cppc_perf; -- u32 highest_perf; - - int ret = cppc_get_perf_caps(cpudata->cpu, &cppc_perf); - if (ret) - return ret; - -- highest_perf = amd_get_highest_perf(); -- if (highest_perf > cppc_perf.highest_perf) -- highest_perf = cppc_perf.highest_perf; -- -- WRITE_ONCE(cpudata->highest_perf, highest_perf); -+ if (!prefcore_enabled) -+ WRITE_ONCE(cpudata->highest_perf, cppc_perf.highest_perf); -+ else -+ WRITE_ONCE(cpudata->highest_perf, AMD_PSTATE_PREFCORE_THRESHOLD); - - WRITE_ONCE(cpudata->nominal_perf, cppc_perf.nominal_perf); - WRITE_ONCE(cpudata->lowest_nonlinear_perf, - cppc_perf.lowest_nonlinear_perf); - WRITE_ONCE(cpudata->lowest_perf, cppc_perf.lowest_perf); -+ WRITE_ONCE(cpudata->prefcore_highest_perf, cppc_perf.highest_perf); - - if (cppc_state == AMD_PSTATE_ACTIVE) - return 0; -@@ -676,6 +685,118 @@ static void amd_perf_ctl_reset(unsigned int cpu) - wrmsrl_on_cpu(cpu, MSR_AMD_PERF_CTL, 0); - } - -+/* -+ * Set AMD Pstate Preferred Core enable can't be done directly from cpufreq callbacks -+ * due to locking, so queue the work for later. -+ */ -+static void amd_pstste_sched_prefcore_workfn(struct work_struct *work) -+{ -+ sched_set_itmt_support(); -+} -+static DECLARE_WORK(sched_prefcore_work, amd_pstste_sched_prefcore_workfn); -+ -+/** -+ * Get the highest performance register value. -+ * @cpu: CPU from which to get highest performance. -+ * @highest_perf: Return address. -+ * -+ * Return: 0 for success, -EIO otherwise. -+ */ -+static int amd_pstate_get_highest_perf(int cpu, u64 *highest_perf) -+{ -+ int ret; -+ -+ if (boot_cpu_has(X86_FEATURE_CPPC)) { -+ u64 cap1; -+ -+ ret = rdmsrl_safe_on_cpu(cpu, MSR_AMD_CPPC_CAP1, &cap1); -+ if (ret) -+ return ret; -+ WRITE_ONCE(*highest_perf, AMD_CPPC_HIGHEST_PERF(cap1)); -+ } else { -+ ret = cppc_get_highest_perf(cpu, highest_perf); -+ } -+ -+ return (ret); -+} -+ -+static void amd_pstate_init_prefcore(void) -+{ -+ int cpu, ret; -+ u64 highest_perf; -+ -+ if (no_prefcore) -+ return; -+ -+ for_each_possible_cpu(cpu) { -+ ret = amd_pstate_get_highest_perf(cpu, &highest_perf); -+ if (ret) -+ break; -+ -+ sched_set_itmt_core_prio(highest_perf, cpu); -+ } -+ -+ /* -+ * This code can be run during CPU online under the -+ * CPU hotplug locks, so sched_set_amd_prefcore_support() -+ * cannot be called from here. Queue up a work item -+ * to invoke it. -+ */ -+ schedule_work(&sched_prefcore_work); -+} -+ -+static void amd_pstate_update_highest_perf(unsigned int cpu) -+{ -+ struct cpufreq_policy *policy; -+ struct amd_cpudata *cpudata; -+ u32 prev_high = 0, cur_high = 0; -+ u64 highest_perf; -+ int ret; -+ -+ if (!prefcore_enabled) -+ return; -+ -+ ret = amd_pstate_get_highest_perf(cpu, &highest_perf); -+ if (ret) -+ return; -+ -+ policy = cpufreq_cpu_get(cpu); -+ cpudata = policy->driver_data; -+ cur_high = highest_perf; -+ prev_high = READ_ONCE(cpudata->prefcore_highest_perf); -+ -+ if (prev_high != cur_high) { -+ WRITE_ONCE(cpudata->prefcore_highest_perf, cur_high); -+ sched_set_itmt_core_prio(cur_high, cpu); -+ } -+ -+ cpufreq_cpu_put(policy); -+} -+ -+/* -+ * Check if AMD Pstate Preferred core feature is supported and enabled -+ * 1) no_prefcore is used to enable or disable AMD Pstate Preferred Core -+ * loading when user would like to enable or disable it. Without that, -+ * AMD Pstate Preferred Core will be disabled by default if the processor -+ * and power firmware can support preferred core feature. -+ * 2) prefcore_enabled is used to indicate whether CPPC preferred core is enabled. -+ */ -+static void check_prefcore_supported(int cpu) -+{ -+ u64 highest_perf; -+ int ret; -+ -+ if (no_prefcore) -+ return; -+ -+ ret = amd_pstate_get_highest_perf(cpu, &highest_perf); -+ if (ret) -+ return; -+ -+ if(highest_perf < AMD_PSTATE_MAX_CPPC_PERF) -+ prefcore_enabled = true; -+} -+ - static int amd_pstate_cpu_init(struct cpufreq_policy *policy) - { - int min_freq, max_freq, nominal_freq, lowest_nonlinear_freq, ret; -@@ -697,6 +818,9 @@ static int amd_pstate_cpu_init(struct cpufreq_policy *policy) - - cpudata->cpu = policy->cpu; - -+ /* check if CPPC preferred core feature is enabled*/ -+ check_prefcore_supported(policy->cpu); -+ - ret = amd_pstate_init_perf(cpudata); - if (ret) - goto free_cpudata1; -@@ -1012,8 +1136,8 @@ static int amd_pstate_update_status(const char *buf, size_t size) - return 0; - } - --static ssize_t show_status(struct kobject *kobj, -- struct kobj_attribute *attr, char *buf) -+static ssize_t status_show(struct device *dev, -+ struct device_attribute *attr, char *buf) - { - ssize_t ret; - -@@ -1024,7 +1148,7 @@ static ssize_t show_status(struct kobject *kobj, - return ret; - } - --static ssize_t store_status(struct kobject *a, struct kobj_attribute *b, -+static ssize_t status_store(struct device *a, struct device_attribute *b, - const char *buf, size_t count) - { - char *p = memchr(buf, '\n', count); -@@ -1037,13 +1161,20 @@ static ssize_t store_status(struct kobject *a, struct kobj_attribute *b, - return ret < 0 ? ret : count; - } - -+static ssize_t prefcore_state_show(struct device *dev, -+ struct device_attribute *attr, char *buf) -+{ -+ return sysfs_emit(buf, "%s\n", prefcore_enabled ? "enabled" : "disabled"); -+} -+ - cpufreq_freq_attr_ro(amd_pstate_max_freq); - cpufreq_freq_attr_ro(amd_pstate_lowest_nonlinear_freq); - - cpufreq_freq_attr_ro(amd_pstate_highest_perf); - cpufreq_freq_attr_rw(energy_performance_preference); - cpufreq_freq_attr_ro(energy_performance_available_preferences); --define_one_global_rw(status); -+static DEVICE_ATTR_RW(status); -+static DEVICE_ATTR_RO(prefcore_state); - - static struct freq_attr *amd_pstate_attr[] = { - &amd_pstate_max_freq, -@@ -1062,7 +1193,8 @@ static struct freq_attr *amd_pstate_epp_attr[] = { - }; - - static struct attribute *pstate_global_attributes[] = { -- &status.attr, -+ &dev_attr_status.attr, -+ &dev_attr_prefcore_state.attr, - NULL - }; - -@@ -1114,6 +1246,9 @@ static int amd_pstate_epp_cpu_init(struct cpufreq_policy *policy) - cpudata->cpu = policy->cpu; - cpudata->epp_policy = 0; - -+ /* check if CPPC preferred core feature is supported*/ -+ check_prefcore_supported(policy->cpu); -+ - ret = amd_pstate_init_perf(cpudata); - if (ret) - goto free_cpudata1; -@@ -1392,6 +1527,7 @@ static struct cpufreq_driver amd_pstate_driver = { - .suspend = amd_pstate_cpu_suspend, - .resume = amd_pstate_cpu_resume, - .set_boost = amd_pstate_set_boost, -+ .update_highest_perf = amd_pstate_update_highest_perf, - .name = "amd-pstate", - .attr = amd_pstate_attr, - }; -@@ -1406,6 +1542,7 @@ static struct cpufreq_driver amd_pstate_epp_driver = { - .online = amd_pstate_epp_cpu_online, - .suspend = amd_pstate_epp_suspend, - .resume = amd_pstate_epp_resume, -+ .update_highest_perf = amd_pstate_update_highest_perf, - .name = "amd-pstate-epp", - .attr = amd_pstate_epp_attr, - }; -@@ -1506,6 +1643,8 @@ static int __init amd_pstate_init(void) - } - } - -+ amd_pstate_init_prefcore(); -+ - return ret; - - global_attr_free: -@@ -1527,7 +1666,17 @@ static int __init amd_pstate_param(char *str) - - return amd_pstate_set_driver(mode_idx); - } -+ -+static int __init amd_prefcore_param(char *str) -+{ -+ if (!strcmp(str, "enable")) -+ no_prefcore = false; -+ -+ return 0; -+} -+ - early_param("amd_pstate", amd_pstate_param); -+early_param("amd_prefcore", amd_prefcore_param); - - MODULE_AUTHOR("Huang Rui "); - MODULE_DESCRIPTION("AMD Processor P-state Frequency Driver"); -diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c -index 50bbc969f..842357abf 100644 ---- a/drivers/cpufreq/cpufreq.c -+++ b/drivers/cpufreq/cpufreq.c -@@ -2675,6 +2675,19 @@ void cpufreq_update_limits(unsigned int cpu) - } - EXPORT_SYMBOL_GPL(cpufreq_update_limits); - -+/** -+ * cpufreq_update_highest_perf - Update highest performance for a given CPU. -+ * @cpu: CPU to update the highest performance for. -+ * -+ * Invoke the driver's ->update_highest_perf callback if present -+ */ -+void cpufreq_update_highest_perf(unsigned int cpu) -+{ -+ if (cpufreq_driver->update_highest_perf) -+ cpufreq_driver->update_highest_perf(cpu); -+} -+EXPORT_SYMBOL_GPL(cpufreq_update_highest_perf); -+ - /********************************************************************* - * BOOST * - *********************************************************************/ -diff --git a/include/acpi/cppc_acpi.h b/include/acpi/cppc_acpi.h -index 6126c977e..c0b69ffe7 100644 ---- a/include/acpi/cppc_acpi.h -+++ b/include/acpi/cppc_acpi.h -@@ -139,6 +139,7 @@ struct cppc_cpudata { - #ifdef CONFIG_ACPI_CPPC_LIB - extern int cppc_get_desired_perf(int cpunum, u64 *desired_perf); - extern int cppc_get_nominal_perf(int cpunum, u64 *nominal_perf); -+extern int cppc_get_highest_perf(int cpunum, u64 *highest_perf); - extern int cppc_get_perf_ctrs(int cpu, struct cppc_perf_fb_ctrs *perf_fb_ctrs); - extern int cppc_set_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls); - extern int cppc_set_enable(int cpu, bool enable); -@@ -165,6 +166,10 @@ static inline int cppc_get_nominal_perf(int cpunum, u64 *nominal_perf) - { - return -ENOTSUPP; - } -+static inline int cppc_get_highest_perf(int cpunum, u64 *highest_perf) -+{ -+ return -ENOTSUPP; -+} - static inline int cppc_get_perf_ctrs(int cpu, struct cppc_perf_fb_ctrs *perf_fb_ctrs) - { - return -ENOTSUPP; -diff --git a/include/linux/amd-pstate.h b/include/linux/amd-pstate.h -index 446394f84..fa86bc953 100644 ---- a/include/linux/amd-pstate.h -+++ b/include/linux/amd-pstate.h -@@ -70,6 +70,7 @@ struct amd_cpudata { - u32 nominal_perf; - u32 lowest_nonlinear_perf; - u32 lowest_perf; -+ u32 prefcore_highest_perf; - - u32 max_freq; - u32 min_freq; -diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h -index 172ff51c1..766c83a4f 100644 ---- a/include/linux/cpufreq.h -+++ b/include/linux/cpufreq.h -@@ -231,6 +231,7 @@ int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu); - void refresh_frequency_limits(struct cpufreq_policy *policy); - void cpufreq_update_policy(unsigned int cpu); - void cpufreq_update_limits(unsigned int cpu); -+void cpufreq_update_highest_perf(unsigned int cpu); - bool have_governor_per_policy(void); - bool cpufreq_supports_freq_invariance(void); - struct kobject *get_governor_parent_kobj(struct cpufreq_policy *policy); -@@ -376,6 +377,9 @@ struct cpufreq_driver { - /* Called to update policy limits on firmware notifications. */ - void (*update_limits)(unsigned int cpu); - -+ /* Called to update highest performance on firmware notifications. */ -+ void (*update_highest_perf)(unsigned int cpu); -+ - /* optional */ - int (*bios_limit)(int cpu, unsigned int *limit); - --- -2.42.0.rc0.25.ga82fb66fed diff --git a/scripts/patch.sh b/scripts/patch.sh index 4705d26..0cf2285 100755 --- a/scripts/patch.sh +++ b/scripts/patch.sh @@ -15,6 +15,4 @@ patch -Np1 < "../patches/0002-eevdfbore.patch" # Allow setting custom pollrates for usb devices patch -Np1 < "../patches/0004-Allow-to-set-custom-USB-pollrate-for-specific-device.patch" # Allow pre polaris cards to use the amdgpu kernel module -patch -Np1 < "../patches/0005-amdgpu-si-cik-default.patch" -# AMD Patch for CPPC -patch -Np1 < "../patches/0006-AMD-cppc.patch" \ No newline at end of file +patch -Np1 < "../patches/0005-amdgpu-si-cik-default.patch" \ No newline at end of file