Re: [PATCH 2/2 v4] mm/compaction: Disable compact_unevictable_allowed on RT
From: Vlastimil Babka <hidden>
Date: 2020-03-19 16:49:43
Also in:
linux-mm
On 3/19/20 5:39 PM, Sebastian Andrzej Siewior wrote:
Since commit
5bbe3547aa3ba ("mm: allow compaction of unevictable pages")
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 issue a warning on RT
if it is changed.
Link: https://lore.kernel.org/linux-mm/20190710144138.qyn4tuttdq6h7kqx@linutronix.de/ (local)
Acked-by: Mel Gorman <redacted>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>Acked-by: Vlastimil Babka <redacted> Nit below:
quoted hunk ↗ jump to hunk
@@ -2572,6 +2577,28 @@ int proc_dointvec(struct ctl_table *table, int write, 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 changed by %s[%d]\n",
^ "changed" twice
+ table->procname, current->comm, + task_pid_nr(current)); + return ret; +} +#endif + /** * proc_douintvec - read a vector of unsigned integers * @table: the sysctl table