Skip to content

Commit

Permalink
update for 5.18.13-rc1
Browse files Browse the repository at this point in the history
  • Loading branch information
ptr1337 committed Jul 19, 2022
1 parent 5dcd5a6 commit 46427bc
Show file tree
Hide file tree
Showing 18 changed files with 76,119 additions and 1,738 deletions.
18 changes: 8 additions & 10 deletions 5.18/0001-bbr2.patch
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
From 3893291797cd918d3f586f7d2586f9581e41729b Mon Sep 17 00:00:00 2001
From: Piotr Gorski <[email protected]>
Date: Mon, 6 Jun 2022 12:06:05 +0200
From 913db8e46ee968c15994e8a3ad2b61302c318cb1 Mon Sep 17 00:00:00 2001
From: Peter Jung <[email protected]>
Date: Tue, 19 Jul 2022 14:54:30 +0200
Subject: [PATCH 01/16] bbr2

Signed-off-by: Piotr Gorski <[email protected]>
(cherry picked from commit 5dcdd263190426aee1f2a4fcfad012ee70ec5c79)
(cherry picked from commit 84441f200b0ab11ba140f719ed30472a9a7c0b72)
Signed-off-by: Peter Jung <[email protected]>
---
include/linux/tcp.h | 3 +-
include/net/inet_connection_sock.h | 3 +-
Expand Down Expand Up @@ -284,10 +282,10 @@ index f79ab942f03b..389f4c874f87 100644
offsetof(struct tcp_congestion_ops, cong_control),
};
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index e31cf137c614..ef2719e40835 100644
index f2fd1779d925..a33e6ce40c58 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -3085,6 +3085,7 @@ int tcp_disconnect(struct sock *sk, int flags)
@@ -3086,6 +3086,7 @@ int tcp_disconnect(struct sock *sk, int flags)
tp->rx_opt.dsack = 0;
tp->rx_opt.num_sacks = 0;
tp->rcv_ooopack = 0;
Expand Down Expand Up @@ -3053,7 +3051,7 @@ index d854bcfb9906..81c8aac38213 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 6b8fcf79688b..43c7cf103051 100644
index 2d71bcfcc759..3badc342833f 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)
Expand Down Expand Up @@ -3139,7 +3137,7 @@ index 6b8fcf79688b..43c7cf103051 100644
tcp_in_quickack_mode(sk) ||
/* Protocol state mandates a one-time immediate ACK */
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 6b00c17c72aa..1d4c67afeb79 100644
index 34249469e361..4080560d60ad 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -378,7 +378,8 @@ static void tcp_ecn_send(struct sock *sk, struct sk_buff *skb,
Expand Down
3,236 changes: 1,750 additions & 1,486 deletions 5.18/0001-bcachefs-after-lru.patch

Large diffs are not rendered by default.

81 changes: 45 additions & 36 deletions 5.18/0002-cachy.patch
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
From b3144f259e6a4d704576fc10e006a26e3798df73 Mon Sep 17 00:00:00 2001
From 3b4b95052deca953fafd83fd79bc163937a80f91 Mon Sep 17 00:00:00 2001
From: Peter Jung <[email protected]>
Date: Thu, 14 Jul 2022 21:04:25 +0200
Date: Tue, 19 Jul 2022 14:57:22 +0200
Subject: [PATCH 02/16] cachy

Signed-off-by: Peter Jung <[email protected]>
(cherry picked from commit 4c5a18de0d506c1ad4fd4784f4be2a825222f6f2)
---
.../admin-guide/kernel-parameters.txt | 13 +
Documentation/admin-guide/pm/cpuidle.rst | 15 +-
Expand Down Expand Up @@ -46,7 +45,7 @@ Signed-off-by: Peter Jung <[email protected]>
drivers/block/zram/Kconfig | 18 +
drivers/block/zram/zram_drv.c | 39 ++
drivers/cpufreq/Kconfig | 2 +-
drivers/cpufreq/amd-pstate.c | 59 +--
drivers/cpufreq/amd-pstate.c | 62 +--
drivers/cpufreq/cppc_cpufreq.c | 2 +-
drivers/cpufreq/cpufreq_ondemand.c | 6 +-
drivers/firmware/sysfb.c | 18 +-
Expand Down Expand Up @@ -110,7 +109,7 @@ Signed-off-by: Peter Jung <[email protected]>
net/ipv4/tcp.c | 4 +-
scripts/Makefile.lib | 13 +-
scripts/Makefile.modinst | 7 +-
104 files changed, 1953 insertions(+), 437 deletions(-)
104 files changed, 1956 insertions(+), 437 deletions(-)

diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index c4893782055b..b23ba248cce9 100644
Expand Down Expand Up @@ -170,7 +169,7 @@ index aec2cd2aaea7..19754beb5a4e 100644
In addition to the architecture-level kernel command line options affecting CPU
idle time management, there are parameters affecting individual ``CPUIdle``
diff --git a/Makefile b/Makefile
index 323032d60ac3..104fea80f168 100644
index 00ef3b75554d..e5e30c975064 100644
--- a/Makefile
+++ b/Makefile
@@ -758,6 +758,8 @@ else ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3
Expand Down Expand Up @@ -827,7 +826,7 @@ index c84d12608cd2..14902db4c01f 100644
#
# Due to a historical design error, certain syscalls are numbered differently
diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h
index e17de69faa54..dd7a27e09dc8 100644
index cf5553744e83..bc2748c4a957 100644
--- a/arch/x86/include/asm/cpufeatures.h
+++ b/arch/x86/include/asm/cpufeatures.h
@@ -219,7 +219,7 @@
Expand All @@ -840,7 +839,7 @@ index e17de69faa54..dd7a27e09dc8 100644
#define X86_FEATURE_IBRS_ENHANCED ( 7*32+30) /* Enhanced IBRS */
#define X86_FEATURE_MSR_IA32_FEAT_CTL ( 7*32+31) /* "" MSR IA32_FEAT_CTL configured */
diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h
index 4425d6773183..8f7079b680ae 100644
index d15d0ef6b357..d45a548f8762 100644
--- a/arch/x86/include/asm/msr-index.h
+++ b/arch/x86/include/asm/msr-index.h
@@ -538,6 +538,7 @@
Expand Down Expand Up @@ -970,10 +969,10 @@ index 75884d2cdec3..4e6a08d4c7e5 100644
#define MODULE_PROC_FAMILY "ELAN "
#elif defined CONFIG_MCRUSOE
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 0c0b09796ced..ff2075f26ef4 100644
index 8cf0659c0521..b4212597a558 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -1152,7 +1152,8 @@ u32 amd_get_highest_perf(void)
@@ -1173,7 +1173,8 @@ u32 amd_get_highest_perf(void)
struct cpuinfo_x86 *c = &boot_cpu_data;

if (c->x86 == 0x17 && ((c->x86_model >= 0x30 && c->x86_model < 0x40) ||
Expand Down Expand Up @@ -1275,7 +1274,7 @@ index c3038cdc6865..25bf88b571ae 100644
select CPU_FREQ_GOV_PERFORMANCE
help
diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
index 9ac75c1cde9c..83570acecc78 100644
index 9ac75c1cde9c..1574d082780d 100644
--- a/drivers/cpufreq/amd-pstate.c
+++ b/drivers/cpufreq/amd-pstate.c
@@ -31,23 +31,18 @@
Expand Down Expand Up @@ -1304,26 +1303,36 @@ index 9ac75c1cde9c..83570acecc78 100644

/*
* TODO: We need more time to fine tune processors with shared memory solution
@@ -120,8 +115,9 @@ struct amd_cpudata {
@@ -97,6 +92,8 @@ struct amd_aperf_mperf {
* @prev: Last Aperf/Mperf/tsc count value read from register
* @freq: current cpu frequency value
* @boost_supported: check whether the Processor or SBIOS supports boost mode
+ * @precision_boost_off: the core performance boost disabled state
+ * @cppc_hw_conf_cached: the cached hardware configuration register
*
* The amd_cpudata is key private data for each CPU thread in AMD P-State, and
* represents all the attributes and goals that AMD P-State requests at runtime.
@@ -120,8 +117,10 @@ struct amd_cpudata {
struct amd_aperf_mperf cur;
struct amd_aperf_mperf prev;

- u64 freq;
+ u64 freq;
bool boost_supported;
+ bool precision_boost_off;
+ u64 cppc_hw_conf_cached;
};

static inline int pstate_enable(bool enable)
@@ -269,6 +265,7 @@ static void amd_pstate_update(struct amd_cpudata *cpudata, u32 min_perf,
@@ -269,6 +268,7 @@ static void amd_pstate_update(struct amd_cpudata *cpudata, u32 min_perf,
u64 prev = READ_ONCE(cpudata->cppc_req_cached);
u64 value = prev;

+ des_perf = clamp_t(unsigned long, des_perf, min_perf, max_perf);
value &= ~AMD_CPPC_MIN_PERF(~0L);
value |= AMD_CPPC_MIN_PERF(min_perf);

@@ -312,7 +309,7 @@ static int amd_pstate_target(struct cpufreq_policy *policy,
@@ -312,7 +312,7 @@ static int amd_pstate_target(struct cpufreq_policy *policy,
return -ENODEV;

cap_perf = READ_ONCE(cpudata->highest_perf);
Expand All @@ -1332,7 +1341,7 @@ index 9ac75c1cde9c..83570acecc78 100644
max_perf = cap_perf;

freqs.old = policy->cur;
@@ -357,8 +354,6 @@ static void amd_pstate_adjust_perf(unsigned int cpu,
@@ -357,8 +357,6 @@ static void amd_pstate_adjust_perf(unsigned int cpu,
if (max_perf < min_perf)
max_perf = min_perf;

Expand All @@ -1341,7 +1350,7 @@ index 9ac75c1cde9c..83570acecc78 100644
amd_pstate_update(cpudata, min_perf, des_perf, max_perf, true);
}

@@ -438,18 +433,27 @@ static int amd_pstate_set_boost(struct cpufreq_policy *policy, int state)
@@ -438,18 +436,27 @@ static int amd_pstate_set_boost(struct cpufreq_policy *policy, int state)
{
struct amd_cpudata *cpudata = policy->driver_data;
int ret;
Expand Down Expand Up @@ -1372,15 +1381,15 @@ index 9ac75c1cde9c..83570acecc78 100644

ret = freq_qos_update_request(&cpudata->req[1],
policy->cpuinfo.max_freq);
@@ -478,6 +482,7 @@ static int amd_pstate_cpu_init(struct cpufreq_policy *policy)
@@ -478,6 +485,7 @@ static int amd_pstate_cpu_init(struct cpufreq_policy *policy)
int min_freq, max_freq, nominal_freq, lowest_nonlinear_freq, ret;
struct device *dev;
struct amd_cpudata *cpudata;
+ u64 value;

dev = get_cpu_device(policy->cpu);
if (!dev)
@@ -541,7 +546,17 @@ static int amd_pstate_cpu_init(struct cpufreq_policy *policy)
@@ -541,7 +549,17 @@ static int amd_pstate_cpu_init(struct cpufreq_policy *policy)
cpudata->lowest_nonlinear_freq = lowest_nonlinear_freq;

policy->driver_data = cpudata;
Expand All @@ -1398,7 +1407,7 @@ index 9ac75c1cde9c..83570acecc78 100644
amd_pstate_boost_init(cpudata);

return 0;
@@ -555,9 +570,7 @@ static int amd_pstate_cpu_init(struct cpufreq_policy *policy)
@@ -555,9 +573,7 @@ static int amd_pstate_cpu_init(struct cpufreq_policy *policy)

static int amd_pstate_cpu_exit(struct cpufreq_policy *policy)
{
Expand All @@ -1409,7 +1418,7 @@ index 9ac75c1cde9c..83570acecc78 100644

freq_qos_remove_request(&cpudata->req[1]);
freq_qos_remove_request(&cpudata->req[0]);
@@ -599,9 +612,7 @@ static ssize_t show_amd_pstate_max_freq(struct cpufreq_policy *policy,
@@ -599,9 +615,7 @@ static ssize_t show_amd_pstate_max_freq(struct cpufreq_policy *policy,
char *buf)
{
int max_freq;
Expand All @@ -1420,7 +1429,7 @@ index 9ac75c1cde9c..83570acecc78 100644

max_freq = amd_get_max_freq(cpudata);
if (max_freq < 0)
@@ -614,9 +625,7 @@ static ssize_t show_amd_pstate_lowest_nonlinear_freq(struct cpufreq_policy *poli
@@ -614,9 +628,7 @@ static ssize_t show_amd_pstate_lowest_nonlinear_freq(struct cpufreq_policy *poli
char *buf)
{
int freq;
Expand All @@ -1431,7 +1440,7 @@ index 9ac75c1cde9c..83570acecc78 100644

freq = amd_get_lowest_nonlinear_freq(cpudata);
if (freq < 0)
@@ -662,7 +671,7 @@ static struct cpufreq_driver amd_pstate_driver = {
@@ -662,7 +674,7 @@ static struct cpufreq_driver amd_pstate_driver = {
.resume = amd_pstate_cpu_resume,
.set_boost = amd_pstate_set_boost,
.name = "amd-pstate",
Expand All @@ -1440,7 +1449,7 @@ index 9ac75c1cde9c..83570acecc78 100644
};

static int __init amd_pstate_init(void)
@@ -673,7 +682,7 @@ static int __init amd_pstate_init(void)
@@ -673,7 +685,7 @@ static int __init amd_pstate_init(void)
return -ENODEV;

if (!acpi_cpc_valid()) {
Expand Down Expand Up @@ -1481,12 +1490,12 @@ index e8fbf970ff07..416e2097753b 100644
#define MIN_FREQUENCY_UP_THRESHOLD (1)
#define MAX_FREQUENCY_UP_THRESHOLD (100)
diff --git a/drivers/firmware/sysfb.c b/drivers/firmware/sysfb.c
index 2bfbb05f7d89..a504f7234f35 100644
index 1f276f108cc9..66f19a13e0f4 100644
--- a/drivers/firmware/sysfb.c
+++ b/drivers/firmware/sysfb.c
@@ -34,6 +34,22 @@
#include <linux/screen_info.h>
#include <linux/sysfb.h>
@@ -69,6 +69,22 @@ void sysfb_disable(void)
}
EXPORT_SYMBOL_GPL(sysfb_disable);

+static int skip_simpledrm;
+
Expand All @@ -1507,15 +1516,15 @@ index 2bfbb05f7d89..a504f7234f35 100644
static __init int sysfb_init(void)
{
struct screen_info *si = &screen_info;
@@ -45,7 +61,7 @@ static __init int sysfb_init(void)
@@ -83,7 +99,7 @@ static __init int sysfb_init(void)

/* try to create a simple-framebuffer device */
compatible = sysfb_parse_mode(si, &mode);
- if (compatible) {
+ if (compatible && !skip_simpledrm) {
ret = sysfb_create_simplefb(si, &mode);
if (!ret)
return 0;
pd = sysfb_create_simplefb(si, &mode);
if (!IS_ERR(pd))
goto unlock_mutex;
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index 54752c85604b..6fa8de3ce7aa 100644
--- a/drivers/hid/usbhid/hid-core.c
Expand Down Expand Up @@ -1887,7 +1896,7 @@ index f82ad7419508..5e8faa70aad6 100644
/* fake multicast ability */
static void set_multicast_list(struct net_device *dev)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index a2862a56fadc..2b5c9bcd106a 100644
index c9831daafbc6..5f3324d51977 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -48,7 +48,7 @@ static u8 nvme_max_retries = 5;
Expand Down Expand Up @@ -3604,7 +3613,7 @@ index a492f159624f..dc765f3eff16 100644
COND_SYSCALL(mbind);
COND_SYSCALL(get_mempolicy);
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 830aaf8ca08e..af4c0806bd8e 100644
index c42ba2d669dc..a6ddbf02a809 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -91,6 +91,9 @@
Expand All @@ -3617,7 +3626,7 @@ index 830aaf8ca08e..af4c0806bd8e 100644

#if defined(CONFIG_SYSCTL)

@@ -1803,6 +1806,15 @@ static struct ctl_table kern_table[] = {
@@ -1806,6 +1809,15 @@ static struct ctl_table kern_table[] = {
.mode = 0644,
.proc_handler = proc_dointvec,
},
Expand Down Expand Up @@ -4858,10 +4867,10 @@ index 1e5b53c2bb26..f1c86ceac71f 100644
release_sock(sk);
if (reqsk_queue_empty(&icsk->icsk_accept_queue))
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index ef2719e40835..b910604b3202 100644
index a33e6ce40c58..542324fb7c4f 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -4672,8 +4672,8 @@ void __init tcp_init(void)
@@ -4673,8 +4673,8 @@ void __init tcp_init(void)
tcp_init_mem();
/* Set per-socket limits to no more than 1/128 the pressure threshold */
limit = nr_free_buffer_pages() << (PAGE_SHIFT - 7);
Expand Down
Loading

0 comments on commit 46427bc

Please sign in to comment.