summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Myandin2022-04-15 14:39:06 +0300
committerEvgeny Myandin2022-04-15 14:39:06 +0300
commit3733495485ed4bea4be193fafbc9c1f74644abee (patch)
treed0f5c348a1ab5ac0b4d00752f9828254c127b917
parent6cd9cf5299730ccefd854aff379a2adb776f79ed (diff)
downloadaur-3733495485ed4bea4be193fafbc9c1f74644abee.tar.gz
kernel release 5.17.3
-rw-r--r--.SRCINFO14
-rw-r--r--0103-tick-Detect_and_fix_jiffies_update_stall.patch84
-rw-r--r--0104-tick-rcu-Stop_allowing_RCU_SOFTIRQ_in_idle.patch116
-rw-r--r--0105-lib-irq_poll-Declare_IRQ_POLL_softirq_vector_as_ksoftirqd-parking_safe.patch53
-rw-r--r--PKGBUILD12
-rw-r--r--config2
6 files changed, 273 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index bce3749e97e6..18a494ef7667 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
pkgbase = linux-acs-manjaro
- pkgver = 5.17.2
+ pkgver = 5.17.3
pkgrel = 1
url = https://www.kernel.org/
arch = x86_64
@@ -18,10 +18,13 @@ pkgbase = linux-acs-manjaro
makedepends = xz
options = !strip
source = https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.17.tar.xz
- source = https://www.kernel.org/pub/linux/kernel/v5.x/patch-5.17.2.xz
+ source = https://www.kernel.org/pub/linux/kernel/v5.x/patch-5.17.3.xz
source = config
source = 0101-ZEN_Add_sysctl_and_CONFIG_to_disallow_unprivileged_CLONE_NEWUSER.patch
source = 0102-random-treat_bootloader_trust_toggle_the_same_way_as_cpu_trust_toggle.patch
+ source = 0103-tick-Detect_and_fix_jiffies_update_stall.patch
+ source = 0104-tick-rcu-Stop_allowing_RCU_SOFTIRQ_in_idle.patch
+ source = 0105-lib-irq_poll-Declare_IRQ_POLL_softirq_vector_as_ksoftirqd-parking_safe.patch
source = 0301-revert-fbcon-remove-now-unusued-softback_lines-cursor-argument.patch
source = 0302-revert-fbcon-remove-no-op-fbcon_set_origin.patch
source = 0303-revert-fbcon-remove-soft-scrollback-code.patch
@@ -40,10 +43,13 @@ pkgbase = linux-acs-manjaro
source = 0413-bootsplash.gitpatch
source = 0999-acs.gitpatch
sha256sums = 555fef61dddb591a83d62dd04e252792f9af4ba9ef14683f64840e46fa20b1b1
- sha256sums = 7d21d9b8818421d52b94f5b74138677155e8f543fd29c39c22beefdb128d5967
- sha256sums = 530f83bc8996e20bc108cd8f22ee0add48880e56837c9dba18796a345abf68c9
+ sha256sums = ff55c64fdbb9490570d0a3f203b0e3ea98a8755f3aafb6e01cd7a23130999975
+ sha256sums = bf6769a3783e7e823af731c6239c296d8f2ac030f049b9c0c85f02afcfff79d9
sha256sums = f85b07d73b2f4ad8bb6b59ee6624b2dd06a03824fc7b00131a01df36c8d899fe
sha256sums = fc9223bf2d430ab1c122daada4f51d835a74f56c007c82842eeca3acd2d788be
+ sha256sums = f7eb15d563cdbb2c5d780559a1c9564ca8d2dd1ea79fc73a5cc8545278605dad
+ sha256sums = ca5bb1ba3cb70020d712fa7f684de7d20d2bd6ad2efe6d92b578ab3b12749b04
+ sha256sums = 6a7cd911548f2b6618ce667f8b88cf1159e6b455e64b74d802710b4fe83ef0a2
sha256sums = 2b11905b63b05b25807dd64757c779da74dd4c37e36d3f7a46485b1ee5a9d326
sha256sums = 94a8538251ad148f1025cc3de446ce64f73dc32b01815426fb159c722e8fa5bc
sha256sums = 1f18c5c10a3c63e41ecd05ad34cd9f6653ba96e9f1049ce2b7bb6da2578ae710
diff --git a/0103-tick-Detect_and_fix_jiffies_update_stall.patch b/0103-tick-Detect_and_fix_jiffies_update_stall.patch
new file mode 100644
index 000000000000..eee2ffa5950b
--- /dev/null
+++ b/0103-tick-Detect_and_fix_jiffies_update_stall.patch
@@ -0,0 +1,84 @@
+From e3fb9a238974e20ab8a7b56e9f6a19e2acdc9b87 Mon Sep 17 00:00:00 2001
+From: Frederic Weisbecker <frederic@kernel.org>
+Date: Wed, 2 Feb 2022 01:01:07 +0100
+Subject: [PATCH] tick: Detect and fix jiffies update stall
+
+On some rare cases, the timekeeper CPU may be delaying its jiffies
+update duty for a while. Known causes include:
+
+* The timekeeper is waiting on stop_machine in a MULTI_STOP_DISABLE_IRQ
+ or MULTI_STOP_RUN state. Disabled interrupts prevent from timekeeping
+ updates while waiting for the target CPU to complete its
+ stop_machine() callback.
+
+* The timekeeper vcpu has VMEXIT'ed for a long while due to some overload
+ on the host.
+
+Detect and fix these situations with emergency timekeeping catchups.
+
+Original-patch-by: Paul E. McKenney <paulmck@kernel.org>
+Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+---
+ kernel/time/tick-sched.c | 17 +++++++++++++++++
+ kernel/time/tick-sched.h | 4 ++++
+ 2 files changed, 21 insertions(+)
+
+diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
+index 17a283ce2b20fb..c89f50a7e6903e 100644
+--- a/kernel/time/tick-sched.c
++++ b/kernel/time/tick-sched.c
+@@ -169,6 +169,8 @@ static ktime_t tick_init_jiffy_update(void)
+ return period;
+ }
+
++#define MAX_STALLED_JIFFIES 5
++
+ static void tick_sched_do_timer(struct tick_sched *ts, ktime_t now)
+ {
+ int cpu = smp_processor_id();
+@@ -196,6 +198,21 @@ static void tick_sched_do_timer(struct tick_sched *ts, ktime_t now)
+ if (tick_do_timer_cpu == cpu)
+ tick_do_update_jiffies64(now);
+
++ /*
++ * If jiffies update stalled for too long (timekeeper in stop_machine()
++ * or VMEXIT'ed for several msecs), force an update.
++ */
++ if (ts->last_tick_jiffies != jiffies) {
++ ts->stalled_jiffies = 0;
++ ts->last_tick_jiffies = READ_ONCE(jiffies);
++ } else {
++ if (++ts->stalled_jiffies == MAX_STALLED_JIFFIES) {
++ tick_do_update_jiffies64(now);
++ ts->stalled_jiffies = 0;
++ ts->last_tick_jiffies = READ_ONCE(jiffies);
++ }
++ }
++
+ if (ts->inidle)
+ ts->got_idle_tick = 1;
+ }
+diff --git a/kernel/time/tick-sched.h b/kernel/time/tick-sched.h
+index d952ae39342363..504649513399ba 100644
+--- a/kernel/time/tick-sched.h
++++ b/kernel/time/tick-sched.h
+@@ -49,6 +49,8 @@ enum tick_nohz_mode {
+ * @timer_expires_base: Base time clock monotonic for @timer_expires
+ * @next_timer: Expiry time of next expiring timer for debugging purpose only
+ * @tick_dep_mask: Tick dependency mask - is set, if someone needs the tick
++ * @last_tick_jiffies: Value of jiffies seen on last tick
++ * @stalled_jiffies: Number of stalled jiffies detected across ticks
+ */
+ struct tick_sched {
+ struct hrtimer sched_timer;
+@@ -77,6 +79,8 @@ struct tick_sched {
+ u64 next_timer;
+ ktime_t idle_expires;
+ atomic_t tick_dep_mask;
++ unsigned long last_tick_jiffies;
++ unsigned int stalled_jiffies;
+ };
+
+ extern struct tick_sched *tick_get_tick_sched(int cpu);
+
diff --git a/0104-tick-rcu-Stop_allowing_RCU_SOFTIRQ_in_idle.patch b/0104-tick-rcu-Stop_allowing_RCU_SOFTIRQ_in_idle.patch
new file mode 100644
index 000000000000..60cf7507aedf
--- /dev/null
+++ b/0104-tick-rcu-Stop_allowing_RCU_SOFTIRQ_in_idle.patch
@@ -0,0 +1,116 @@
+ From 894c674f70127b8fe02878ada383f534a1c63beb Mon Sep 17 00:00:00 2001
+From: Frederic Weisbecker <frederic@kernel.org>
+Date: Tue, 8 Feb 2022 17:16:34 +0100
+Subject: [PATCH] tick/rcu: Stop allowing RCU_SOFTIRQ in idle
+
+RCU_SOFTIRQ used to be special in that it could be raised on purpose
+within the idle path to prevent from stopping the tick. Some code still
+prevents from unnecessary warnings related to this specific behaviour
+while entering in dynticks-idle mode.
+
+However the nohz layout has changed quite a bit in ten years, and the
+removal of CONFIG_RCU_FAST_NO_HZ has been the final straw to this
+safe-conduct. Now the RCU_SOFTIRQ vector is expected to be raised from
+sane places.
+
+A remaining corner case is admitted though when the vector is invoked
+in fragile hotplug path.
+
+Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Paul E. McKenney <paulmck@kernel.org>
+Cc: Paul Menzel <pmenzel@molgen.mpg.de>
+---
+ include/linux/interrupt.h | 8 ++++++-
+ kernel/time/tick-sched.c | 50 +++++++++++++++++++++++++++++++--------
+ 2 files changed, 47 insertions(+), 11 deletions(-)
+
+diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
+index 9367f1cb2e3c4b..9613326d2f8af1 100644
+--- a/include/linux/interrupt.h
++++ b/include/linux/interrupt.h
+@@ -579,7 +579,13 @@ enum
+ NR_SOFTIRQS
+ };
+
+-#define SOFTIRQ_STOP_IDLE_MASK (~(1 << RCU_SOFTIRQ))
++/*
++ * Ignoring the RCU vector after ksoftirqd is parked is fine
++ * because:
++ * 1) rcutree_migrate_callbacks() takes care of the queue.
++ * 2) rcu_report_dead() reports the final quiescent states.
++ */
++#define SOFTIRQ_HOTPLUG_SAFE_MASK (BIT(RCU_SOFTIRQ))
+
+ /* map softirq index to softirq name. update 'softirq_to_name' in
+ * kernel/softirq.c when adding a new softirq.
+diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
+index 566ad5bd83e962..2d76c91b85de42 100644
+--- a/kernel/time/tick-sched.c
++++ b/kernel/time/tick-sched.c
+@@ -999,6 +999,45 @@ static void tick_nohz_full_update_tick(struct tick_sched *ts)
+ __tick_nohz_full_update_tick(ts, ktime_get());
+ }
+
++/*
++ * A pending softirq outside an IRQ (or softirq disabled section) context
++ * should be waiting for ksoftirqd to handle it. Therefore we shouldn't
++ * reach here due to the need_resched() early check in can_stop_idle_tick().
++ *
++ * However if we are between CPUHP_AP_SMPBOOT_THREADS and CPU_TEARDOWN_CPU on the
++ * cpu_down() process, softirqs can still be raised while ksoftirqd is parked,
++ * triggering the below since wakep_softirqd() is ignored.
++ *
++ */
++static bool report_idle_softirq(void)
++{
++ static int ratelimit;
++ unsigned int pending = local_softirq_pending();
++
++ if (likely(!pending))
++ return false;
++
++ /* Some softirqs claim to be safe against hotplug and ksoftirqd parking */
++ if (!cpu_active(smp_processor_id())) {
++ pending &= ~SOFTIRQ_HOTPLUG_SAFE_MASK;
++ if (!pending)
++ return false;
++ }
++
++ if (ratelimit < 10)
++ return false;
++
++ /* On RT, softirqs handling may be waiting on some lock */
++ if (!local_bh_blocked())
++ return false;
++
++ pr_warn("NOHZ tick-stop error: local softirq work is pending, handler #%02x!!!\n",
++ pending);
++ ratelimit++;
++
++ return true;
++}
++
+ static bool can_stop_idle_tick(int cpu, struct tick_sched *ts)
+ {
+ /*
+@@ -1025,17 +1064,8 @@ static bool can_stop_idle_tick(int cpu, struct tick_sched *ts)
+ if (need_resched())
+ return false;
+
+- if (unlikely(local_softirq_pending())) {
+- static int ratelimit;
+-
+- if (ratelimit < 10 && !local_bh_blocked() &&
+- (local_softirq_pending() & SOFTIRQ_STOP_IDLE_MASK)) {
+- pr_warn("NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #%02x!!!\n",
+- (unsigned int) local_softirq_pending());
+- ratelimit++;
+- }
++ if (unlikely(report_idle_softirq()))
+ return false;
+- }
+
+ if (tick_nohz_full_enabled()) {
+ /*
diff --git a/0105-lib-irq_poll-Declare_IRQ_POLL_softirq_vector_as_ksoftirqd-parking_safe.patch b/0105-lib-irq_poll-Declare_IRQ_POLL_softirq_vector_as_ksoftirqd-parking_safe.patch
new file mode 100644
index 000000000000..64c483563d02
--- /dev/null
+++ b/0105-lib-irq_poll-Declare_IRQ_POLL_softirq_vector_as_ksoftirqd-parking_safe.patch
@@ -0,0 +1,53 @@
+From 43a520143b091d79168ca3284aa23501c09f711e Mon Sep 17 00:00:00 2001
+From: Frederic Weisbecker <frederic@kernel.org>
+Date: Tue, 8 Feb 2022 17:16:35 +0100
+Subject: [PATCH] lib/irq_poll: Declare IRQ_POLL softirq vector as
+ ksoftirqd-parking safe
+
+The following warning may appear while setting a CPU down:
+
+ NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #20!!!
+
+The IRQ_POLL_SOFTIRQ vector can be raised during the hotplug cpu_down()
+path after ksoftirqd is parked and before the CPU actually dies. However
+this is handled afterward at the CPUHP_IRQ_POLL_DEAD stage where the
+queue gets migrated.
+
+Hence this warning can be considered spurious and the vector can join
+the "hotplug-safe" list.
+
+Reported-and-tested-by: Paul Menzel <pmenzel@molgen.mpg.de>
+Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Paul E. McKenney <paulmck@kernel.org>
+Cc: Paul Menzel <pmenzel@molgen.mpg.de>
+---
+ include/linux/interrupt.h | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
+index 9613326d2f8af1..f40754caaefa43 100644
+--- a/include/linux/interrupt.h
++++ b/include/linux/interrupt.h
+@@ -580,12 +580,15 @@ enum
+ };
+
+ /*
+- * Ignoring the RCU vector after ksoftirqd is parked is fine
+- * because:
+- * 1) rcutree_migrate_callbacks() takes care of the queue.
++ * The following vectors can be safely ignored after ksoftirqd is parked:
++ *
++ * _ RCU:
++ * 1) rcutree_migrate_callbacks() migrates the queue.
+ * 2) rcu_report_dead() reports the final quiescent states.
++ *
++ * _ IRQ_POLL: irq_poll_cpu_dead() migrates the queue
+ */
+-#define SOFTIRQ_HOTPLUG_SAFE_MASK (BIT(RCU_SOFTIRQ))
++#define SOFTIRQ_HOTPLUG_SAFE_MASK (BIT(RCU_SOFTIRQ) | BIT(IRQ_POLL_SOFTIRQ))
+
+ /* map softirq index to softirq name. update 'softirq_to_name' in
+ * kernel/softirq.c when adding a new softirq.
+
diff --git a/PKGBUILD b/PKGBUILD
index c7fb8c685c68..7c5f42cf14ee 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -14,7 +14,7 @@ pkgname=('linux-acs-manjaro' 'linux-acs-manjaro-headers')
_kernelname=-ACS-MANJARO
_basekernel=5.17
_basever=517
-pkgver=5.17.2
+pkgver=5.17.3
pkgrel=1
arch=('x86_64')
url="https://www.kernel.org/"
@@ -38,6 +38,9 @@ source=("https://www.kernel.org/pub/linux/kernel/v5.x/linux-${_basekernel}.tar.x
# ARCH Patches
'0101-ZEN_Add_sysctl_and_CONFIG_to_disallow_unprivileged_CLONE_NEWUSER.patch'
'0102-random-treat_bootloader_trust_toggle_the_same_way_as_cpu_trust_toggle.patch'
+ '0103-tick-Detect_and_fix_jiffies_update_stall.patch'
+ '0104-tick-rcu-Stop_allowing_RCU_SOFTIRQ_in_idle.patch'
+ '0105-lib-irq_poll-Declare_IRQ_POLL_softirq_vector_as_ksoftirqd-parking_safe.patch'
# MANJARO Patches
# Bootsplash
@@ -60,10 +63,13 @@ source=("https://www.kernel.org/pub/linux/kernel/v5.x/linux-${_basekernel}.tar.x
# ACS override patch
'0999-acs.gitpatch')
sha256sums=('555fef61dddb591a83d62dd04e252792f9af4ba9ef14683f64840e46fa20b1b1'
- '7d21d9b8818421d52b94f5b74138677155e8f543fd29c39c22beefdb128d5967'
- '530f83bc8996e20bc108cd8f22ee0add48880e56837c9dba18796a345abf68c9'
+ 'ff55c64fdbb9490570d0a3f203b0e3ea98a8755f3aafb6e01cd7a23130999975'
+ 'bf6769a3783e7e823af731c6239c296d8f2ac030f049b9c0c85f02afcfff79d9'
'f85b07d73b2f4ad8bb6b59ee6624b2dd06a03824fc7b00131a01df36c8d899fe'
'fc9223bf2d430ab1c122daada4f51d835a74f56c007c82842eeca3acd2d788be'
+ 'f7eb15d563cdbb2c5d780559a1c9564ca8d2dd1ea79fc73a5cc8545278605dad'
+ 'ca5bb1ba3cb70020d712fa7f684de7d20d2bd6ad2efe6d92b578ab3b12749b04'
+ '6a7cd911548f2b6618ce667f8b88cf1159e6b455e64b74d802710b4fe83ef0a2'
'2b11905b63b05b25807dd64757c779da74dd4c37e36d3f7a46485b1ee5a9d326'
'94a8538251ad148f1025cc3de446ce64f73dc32b01815426fb159c722e8fa5bc'
'1f18c5c10a3c63e41ecd05ad34cd9f6653ba96e9f1049ce2b7bb6da2578ae710'
diff --git a/config b/config
index cd7494fb05b5..d8315b750cf6 100644
--- a/config
+++ b/config
@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
-# Linux/x86 5.17.2-1 Kernel Configuration
+# Linux/x86 5.17.3-1 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (GCC) 11.2.0"
CONFIG_CC_IS_GCC=y