[RFC] mm: Disable NUMA_BALANCING_DEFAULT_ENABLED and TRANSPARENT_HUGEPAGE on PREEMPT_RT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In https://lore.kernel.org/all/20200304091159.GN3818@xxxxxxxxxxxxxxxxxxx/
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@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
---
 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





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux