Note that there are some explanatory texts on larger screens.

plurals
  1. POIs there NUMA next-touch policy in modern Linux
    primarykey
    data
    text
    <p>When we working on NUMA system, memory can be local or remote relative to current NUMA node. To make memory more local there is a "first-touch" policy (the default memory to node binding strategy): <a href="http://lse.sourceforge.net/numa/status/description.html" rel="noreferrer">http://lse.sourceforge.net/numa/status/description.html</a></p> <blockquote> <p><em>Default Memory Binding</em> It is important that user programs' memory is allocated on a node close to the one containing the CPU on which they are running. Therefore, by default, page faults are satisfied by memory from the node containing the page-faulting CPU. Because the first CPU to touch the page will be the CPU that faults the page in, this default policy is called "first touch".</p> </blockquote> <p><a href="http://techpubs.sgi.com/library/dynaweb_docs/0640/SGI_Developer/books/OrOn2_PfTune/sgi_html/ch08.html" rel="noreferrer">http://techpubs.sgi.com/library/dynaweb_docs/0640/SGI_Developer/books/OrOn2_PfTune/sgi_html/ch08.html</a></p> <blockquote> <p>The default policy is called first-touch. Under this policy, the process that first touches (that is, writes to, or reads from) a page of memory causes that page to be allocated in the node on which the process is running. This policy works well for sequential programs and for many parallel programs as well. </p> </blockquote> <p>There are also some other non-local policies. Also there is a function to require explicit move of memory segment to some NUMA node.</p> <p>But sometimes (in context of many threads of single applications) it can be useful to have "next touch" policy: call some function to "unbind" some memory region (up to 100s MB) with some data and reapply the "first touch"-like handler on this region which will migrate the page on next touch (read or write) to the numa node of accessing thread. </p> <p>This policy is useful in case when there are huge data to process by many threads and there are different patterns of access to this data (e.g. first phase - split the 2D array by columns via threads; second - split the same data by rows). </p> <p>Such policy was supported in Solaris since 9 via madvice with MADV_ACCESS_LWP flag</p> <p><a href="https://cims.nyu.edu/cgi-systems/man.cgi?section=3C&amp;topic=madvise" rel="noreferrer">https://cims.nyu.edu/cgi-systems/man.cgi?section=3C&amp;topic=madvise</a></p> <blockquote> <p>MADV_ACCESS_LWP Tell the kernel that the next LWP to touch the specified address range will access it most heavily, so the kernel should try to allocate the memory and other resources for this range and the LWP accordingly.</p> </blockquote> <p>There was (may 2009) the patch to linux kernel named "affinity-on-next-touch", <a href="http://lwn.net/Articles/332754/" rel="noreferrer">http://lwn.net/Articles/332754/</a> (<a href="http://thread.gmane.org/gmane.linux.kernel/834829" rel="noreferrer">thread</a>) but as I understand it was unaccepted into mainline, isn't it?</p> <p>Also there were Lee Schermerhorn's "migrate_on_fault" patches <a href="http://free.linux.hp.com/~lts/Patches/PageMigration/" rel="noreferrer">http://free.linux.hp.com/~lts/Patches/PageMigration/</a>.</p> <p>So, the question: Is there some next-touch for NUMA in current vanilla Linux kernel or in some major fork, like RedHat linux kernel or Oracle linux kernel?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload