From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: linux-mm@kvack.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
Vlastimil Babka <vbabka@suse.cz>,
Mel Gorman <mgorman@techsingularity.net>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: [RFC] mm: Disable NUMA_BALANCING_DEFAULT_ENABLED and TRANSPARENT_HUGEPAGE on PREEMPT_RT
Date: Tue, 26 Oct 2021 18:51:00 +0200 [thread overview]
Message-ID: <20211026165100.ahz5bkx44lrrw5pt@linutronix.de> (raw)
In https://lore.kernel.org/all/20200304091159.GN3818@techsingularity.net/
Mel wrote:
| While I ack'd this, an RT application using THP is playing with fire,
| I know the RT extension for SLE explicitly disables it from being enabled
| at kernel config time. At minimum the critical regions should be mlocked
| followed by prctl to disable future THP faults that are non-deterministic,
| both from an allocation point of view, and a TLB access point of view. It's
| still reasonable to expect a smaller TLB reach for huge pages than
| base pages.
With TRANSPARENT_HUGEPAGE enabled I haven't seen spikes > 100us
in cyclictest. I did have mlock_all() enabled but nothing else.
PR_SET_THP_DISABLE remained unchanged (enabled). Is there anything to
stress this to be sure or is mlock_all() enough to do THP but leave the
mlock() applications alone?
Then Mel continued with:
| It's a similar hazard with NUMA balancing, an RT application should either
| disable balancing globally or set a memory policy that forces it to be
| ignored. They should be doing this anyway to avoid non-deterministic
| memory access costs due to NUMA artifacts but it wouldn't surprise me
| if some applications got it wrong.
Usually (often) RT applications are pinned. I would assume that on
bigger box the RT tasks are at least pinned to a node. How bad can this
get in worst case? cyclictest pins every thread to CPU. I could remove
this for testing. What would be a good test to push this to its limit?
Cc: Mel Gorman <mgorman@techsingularity.net>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
init/Kconfig | 2 +-
mm/Kconfig | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/init/Kconfig b/init/Kconfig
index edc0a0228f143..8e96817d507c3 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -922,7 +922,7 @@ config NUMA_BALANCING
config NUMA_BALANCING_DEFAULT_ENABLED
bool "Automatically enable NUMA aware memory/task placement"
default y
- depends on NUMA_BALANCING
+ depends on NUMA_BALANCING && !PREEMPT_RT
help
If set, automatic NUMA balancing will be enabled if running on a NUMA
machine.
diff --git a/mm/Kconfig b/mm/Kconfig
index c150a0c6fce2c..5c5508fafcec5 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -374,7 +374,7 @@ config NOMMU_INITIAL_TRIM_EXCESS
config TRANSPARENT_HUGEPAGE
bool "Transparent Hugepage Support"
- depends on HAVE_ARCH_TRANSPARENT_HUGEPAGE
+ depends on HAVE_ARCH_TRANSPARENT_HUGEPAGE && !PREEMPT_RT
select COMPACTION
select XARRAY_MULTI
help
--
2.33.1
next reply other threads:[~2021-10-26 16:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-26 16:51 Sebastian Andrzej Siewior [this message]
2021-10-27 9:12 ` [RFC] mm: Disable NUMA_BALANCING_DEFAULT_ENABLED and TRANSPARENT_HUGEPAGE on PREEMPT_RT Mel Gorman
2021-10-28 12:04 ` Sebastian Andrzej Siewior
2021-10-28 12:52 ` Mel Gorman
2021-10-28 13:56 ` Sebastian Andrzej Siewior
2021-10-28 14:14 ` Mel Gorman
2021-10-28 14:34 ` Sebastian Andrzej Siewior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211026165100.ahz5bkx44lrrw5pt@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=vbabka@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).