All of
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <>
To: Mel Gorman <>
Cc:, Andrew Morton <>,
	Vlastimil Babka <>,
	Peter Zijlstra <>,
	Thomas Gleixner <>
Date: Thu, 28 Oct 2021 15:56:47 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On 2021-10-28 13:52:24 [+0100], Mel Gorman wrote:
> > Yes that was my question. So if you have "always", do mlock_all() in the
> > application and then have other threads that same application doing
> > malloc/ free of memory that the RT thread is not touching then bad
> > things can still happen, right?
> > My understanding is that all threads can be blocked in a page fault if
> > there is some THP operation going on.
> > 
> Hmm, it could happen if all the memory used by the RT thread was not
> hugepage-aligned and potentially khugepaged could interfere. khugepaged
> can be disabled if tuned properly but the alignment requirement would be
> tricky. Probably safer to just disable it like it has been historically.
> For consistently, force NUMA_BALANCING to be disabled too because it
> introduces non-deterministic latencies even if memory regions are locked
> and bound.

Okay. I don't mind disabling it or keeping it enabled under some
restrictions. I just need it to document it so people are aware why it
is disabled so if they want to enable they know what the areas that need

THP disable due to alignment issues and potential defragmentation by
khugepaged. Understood. Workaround: Use hugepages.

NUMA_BALANCING. It looks like it replaces the physical page while
keeping the virtual address. This kind of page migration does not look
good if it happens for everyone since it involves mmap_lock.
Let me write that up and post properly.

Thank you.

> > > There is the slight caveat that even then THP can have inconsistent
> > > latencies if it has a split THP with separate entries for base and huge
> > > pages. The responsibility would be on the person deploying the application
> > > to ensure a platform was suitable for both RT and using huge pages.
> > 
> > split THP?
> Sorry, "split TLB" where part of the TLB only handles base pages and
> another part handles huge pages.

ah okay.


  reply	other threads:[~2021-10-28 13:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-26 16:51 [RFC] mm: Disable NUMA_BALANCING_DEFAULT_ENABLED and TRANSPARENT_HUGEPAGE on PREEMPT_RT Sebastian Andrzej Siewior
2021-10-27  9:12 ` 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 [this message]
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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \

* 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.