linux - How is NUMA represented in virtual memory? -


there many resources describing architecture of numa hardware perspective , performance implications of writing software numa-aware, have not yet found information regarding how mapping between virtual pages , physical frames decided respect numa.

more specifically, application running on modern linux still sees single contiguous virtual address space.

how can application tell parts of address space mapped onto local memory , mapped onto memory of numa node?

if answer application cannot tell, how os decide when map virtual page physical memory of numa node rather local physical memory?

a quick answer have program @ /proc/self/numa_maps. example output looks like:

$ cat /proc/self/numa_maps    # dumps current zsh numa_maps 55a4d27ff000 default file=/usr/bin/zsh mapped=177 n0=177 kernelpagesize_kb=4 55a4d2ab9000 default file=/usr/bin/zsh anon=2 dirty=2 n0=2 kernelpagesize_kb=4 55a4d2abb000 default file=/usr/bin/zsh anon=6 dirty=6 n0=4 n1=2 kernelpagesize_kb=4 55a4d2ac1000 default anon=9 dirty=9 n0=4 n1=5 kernelpagesize_kb=4 

the first field shown on each line starting address allows correlation output /proc/pid/maps. n<node>=<pages> tells how many pages allocated on each node.

so if need know numa node number of memory area, bisect search on output of file.

some more information here:

https://www.kernel.org/doc/documentation/vm/numa_memory_policy.txt https://lwn.net/articles/486858/ toward better numa scheduling


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -