[lkml]   [2021]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRE: [RFC PATCH v3 1/2] mempinfd: Add new syscall to provide memory pin
On Sun, 7 Feb 2021, Song Bao Hua (Barry Song) wrote:

> NUMA balancer is just one of many reasons for page migration. Even one
> simple alloc_pages() can cause memory migration in just single NUMA
> node or UMA system.
> The other reasons for page migration include but are not limited to:
> * memory move due to CMA
> * memory move due to huge pages creation
> Hardly we can ask users to disable the COMPACTION, CMA and Huge Page
> in the whole system.

What about only for mlocked memory, i.e. disable

Adding syscalls is a big deal, we can make a reasonable inference that
we'll have to support this forever if it's merged. I haven't seen mention
of what other unevictable memory *should* be migratable that would be
adversely affected if we disable that sysctl. Maybe that gets you part of
the way there and there are some other deficiencies, but it seems like a
good start would be to describe how CONFIG_NUMA_BALANCING=n +
vm.compact_unevcitable_allowed + mlock() doesn't get you mostly there and
then look into what's missing.

If it's a very compelling case where there simply are no alternatives, it
would make sense. Alternative is to find a more generic way, perhaps in
combination with vm.compact_unevictable_allowed, to achieve what you're
looking to do that can be useful even beyond your originally intended use

 \ /
  Last update: 2021-02-08 03:20    [W:0.119 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site