summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2020-03-30 16:03:29 +0200
committerSebastian Andrzej Siewior <bigeasy@linutronix.de>2020-03-30 16:03:29 +0200
commitde15919041ffe1b3a2034fe40b47305f747c575c (patch)
tree17ea0935792349fb645acbc69594995629a63c9e
parent99129182c19e265928d164eed0e584e2db1827a2 (diff)
downloadlinux-rt-5.4.28-rt19-patches.tar.gz
[ANNOUNCE] v5.4.28-rt19v5.4.28-rt19-patches
Dear RT folks! I'm pleased to announce the v5.4.28-rt19 patch set. Changes since v5.4.28-rt18: - Memory compaction of unevictable pages has been disabled in the v5.4 release. This aligns the change with what has been prepared for upstream: Disable is by default on PREEMPT_RT (/proc/sys/vm/compact_unevictable_allowed reads 0) but allow enabling it which will trigger a warning. Known issues - It has been pointed out that due to changes to the printk code the internal buffer representation changed. This is only an issue if tools like `crash' are used to extract the printk buffer from a kernel memory image. The delta patch against v5.4.28-rt18 is appended below and can be found here: https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.4/incr/patch-5.4.28-rt18-rt19.patch.xz You can get this release via the git tree at: git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git v5.4.28-rt19 The RT patch against v5.4.28 can be found here: https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patch-5.4.28-rt19.patch.xz The split quilt queue is available at: https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.28-rt19.tar.xz Sebastian Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-rw-r--r--patches/localversion.patch2
-rw-r--r--patches/mm-compaction-Disable-compact_unevictable_allowed-on.patch84
-rw-r--r--patches/mm-compaction-Really-limit-compact_unevictable_allow.patch32
-rw-r--r--patches/series8
4 files changed, 104 insertions, 22 deletions
diff --git a/patches/localversion.patch b/patches/localversion.patch
index 48a458c6f3b7..19d7ea05016c 100644
--- a/patches/localversion.patch
+++ b/patches/localversion.patch
@@ -10,4 +10,4 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- /dev/null
+++ b/localversion-rt
@@ -0,0 +1 @@
-+-rt18
++-rt19
diff --git a/patches/mm-compaction-Disable-compact_unevictable_allowed-on.patch b/patches/mm-compaction-Disable-compact_unevictable_allowed-on.patch
index 4d0605cf5345..8381662480c4 100644
--- a/patches/mm-compaction-Disable-compact_unevictable_allowed-on.patch
+++ b/patches/mm-compaction-Disable-compact_unevictable_allowed-on.patch
@@ -9,35 +9,83 @@ it is allowed to examine mlocked pages and compact them by default.
On -RT even minor pagefaults are problematic because it may take a few
100us to resolve them and until then the task is blocked.
-Make compact_unevictable_allowed = 0 default and remove it from /proc on
-RT.
+Make compact_unevictable_allowed = 0 default and issue a warning on RT
+if it is changed.
Link: https://lore.kernel.org/linux-mm/20190710144138.qyn4tuttdq6h7kqx@linutronix.de/
+Acked-by: Mel Gorman <mgorman@techsingularity.net>
+Acked-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
- kernel/sysctl.c | 3 ++-
- mm/compaction.c | 4 ++++
- 2 files changed, 6 insertions(+), 1 deletion(-)
+ Documentation/admin-guide/sysctl/vm.rst | 3 +++
+ kernel/sysctl.c | 29 ++++++++++++++++++++++++++++-
+ mm/compaction.c | 4 ++++
+ 3 files changed, 35 insertions(+), 1 deletion(-)
+--- a/Documentation/admin-guide/sysctl/vm.rst
++++ b/Documentation/admin-guide/sysctl/vm.rst
+@@ -128,6 +128,9 @@ allowed to examine the unevictable lru (
+ This should be used on systems where stalls for minor page faults are an
+ acceptable trade for large contiguous free memory. Set to 0 to prevent
+ compaction from moving pages that are unevictable. Default value is 1.
++On CONFIG_PREEMPT_RT the default value is 0 in order to avoid a page fault, due
++to compaction, which would block the task from becomming active until the fault
++is resolved.
+
+
+ dirty_background_bytes
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
-@@ -1488,6 +1488,7 @@ static struct ctl_table vm_table[] = {
- .extra1 = &min_extfrag_threshold,
- .extra2 = &max_extfrag_threshold,
- },
-+#ifndef CONFIG_PREEMPT_RT
- {
- .procname = "compact_unevictable_allowed",
+@@ -212,6 +212,11 @@ static int proc_do_cad_pid(struct ctl_ta
+ void __user *buffer, size_t *lenp, loff_t *ppos);
+ static int proc_taint(struct ctl_table *table, int write,
+ void __user *buffer, size_t *lenp, loff_t *ppos);
++#ifdef CONFIG_COMPACTION
++static int proc_dointvec_minmax_warn_RT_change(struct ctl_table *table,
++ int write, void __user *buffer,
++ size_t *lenp, loff_t *ppos);
++#endif
+ #endif
+
+ #ifdef CONFIG_PRINTK
+@@ -1493,7 +1498,7 @@ static struct ctl_table vm_table[] = {
.data = &sysctl_compact_unevictable_allowed,
-@@ -1497,7 +1498,7 @@ static struct ctl_table vm_table[] = {
+ .maxlen = sizeof(int),
+ .mode = 0644,
+- .proc_handler = proc_dointvec_minmax,
++ .proc_handler = proc_dointvec_minmax_warn_RT_change,
.extra1 = SYSCTL_ZERO,
.extra2 = SYSCTL_ONE,
},
--
+@@ -2581,6 +2586,28 @@ int proc_dointvec(struct ctl_table *tabl
+ return do_proc_dointvec(table, write, buffer, lenp, ppos, NULL, NULL);
+ }
+
++#ifdef CONFIG_COMPACTION
++static int proc_dointvec_minmax_warn_RT_change(struct ctl_table *table,
++ int write, void __user *buffer,
++ size_t *lenp, loff_t *ppos)
++{
++ int ret, old;
++
++ if (!IS_ENABLED(CONFIG_PREEMPT_RT) || !write)
++ return proc_dointvec_minmax(table, write, buffer, lenp, ppos);
++
++ old = *(int *)table->data;
++ ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
++ if (ret)
++ return ret;
++ if (old != *(int *)table->data)
++ pr_warn_once("sysctl attribute %s changed by %s[%d]\n",
++ table->procname, current->comm,
++ task_pid_nr(current));
++ return ret;
++}
+#endif
- #endif /* CONFIG_COMPACTION */
- {
- .procname = "min_free_kbytes",
++
+ /**
+ * proc_douintvec - read a vector of unsigned integers
+ * @table: the sysctl table
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -1590,7 +1590,11 @@ typedef enum {
@@ -45,7 +93,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
* compactable pages.
*/
+#ifdef CONFIG_PREEMPT_RT
-+#define sysctl_compact_unevictable_allowed 0
++int sysctl_compact_unevictable_allowed __read_mostly = 0;
+#else
int sysctl_compact_unevictable_allowed __read_mostly = 1;
+#endif
diff --git a/patches/mm-compaction-Really-limit-compact_unevictable_allow.patch b/patches/mm-compaction-Really-limit-compact_unevictable_allow.patch
new file mode 100644
index 000000000000..b34687eac03b
--- /dev/null
+++ b/patches/mm-compaction-Really-limit-compact_unevictable_allow.patch
@@ -0,0 +1,32 @@
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Tue, 3 Mar 2020 13:43:25 +0100
+Subject: [PATCH] =?UTF-8?q?mm/compaction:=20Really=20limit=20compact=5Fune?=
+ =?UTF-8?q?victable=5Fallowed=20to=200=E2=80=A61?=
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The proc file `compact_unevictable_allowed' should allow 0 and 1 only,
+the `extra*' attribues have been set properly but without
+proc_dointvec_minmax() as the `proc_handler' the limit will not be
+enforced.
+
+Use proc_dointvec_minmax() as the `proc_handler' to enfoce the valid
+specified range.
+
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+---
+ kernel/sysctl.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/kernel/sysctl.c
++++ b/kernel/sysctl.c
+@@ -1493,7 +1493,7 @@ static struct ctl_table vm_table[] = {
+ .data = &sysctl_compact_unevictable_allowed,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+- .proc_handler = proc_dointvec,
++ .proc_handler = proc_dointvec_minmax,
+ .extra1 = SYSCTL_ZERO,
+ .extra2 = SYSCTL_ONE,
+ },
diff --git a/patches/series b/patches/series
index 07da648a4c55..7da82726cfe9 100644
--- a/patches/series
+++ b/patches/series
@@ -124,6 +124,11 @@ smp-Remove-allocation-mask-from-on_each_cpu_cond.patch
# 20200224140726.1550689-1-bigeasy@linutronix.de
drm-vmwgfx-Drop-preempt_disable-in-vmw_fifo_ping_hos.patch
+# 20200303202054.gsosv7fsx2ma3cic@linutronix.de
+mm-compaction-Really-limit-compact_unevictable_allow.patch
+# 20200319165536.ovi75tsr2seared4@linutronix.de
+mm-compaction-Disable-compact_unevictable_allowed-on.patch
+
############################################################
# Ready for posting
############################################################
@@ -137,9 +142,6 @@ Use-CONFIG_PREEMPTION.patch
0003-workqueue-Use-swait-for-wq_manager_wait.patch
0004-workqueue-Convert-the-locks-to-raw-type.patch
-# XXX
-mm-compaction-Disable-compact_unevictable_allowed-on.patch
-
############################################################
# Needs to address review feedback
############################################################