migrate_pages(2) System Calls Manual migrate_pages(2) migrate_pages - NUMA ( ) (libnuma, -lnuma) #include long migrate_pages(int pid, unsigned long maxnode, const unsigned long *old_nodes, const unsigned long *new_nodes); migrate_pages() pid, old_nodes, new_nodes. , old_nodes, . new_nodes old_nodes. old_nodes new_nodes , maxnode . long ( long , maxnode, ). maxnode 1 ( mbind(2), select(2)). pid , . , (CAP_SYS_NICE) ID ID . pid 0, migrate_pages() . , CAP_SYS_NICE. migrate_pages() ( , , ). -1, errno . EFAULT , old_nodes/new_nodes maxnode, . EINVAL maxnode . old_nodes new_nodes ID , ID . ID , new_nodes, , . EPERM (CAP_SYS_NICE) , pid, (CAP_SYS_NICE) . ESRCH pid. Linux. Linux 2.6.16. numa(7). get_mempolicy(2) MPOL_F_MEMS_ALLOWED , . , . migrate_pages() , ( ) , (. mbind(2)) / (. set_mempolicy(2)). , migrate_pages(). glibc, libnuma-devel . get_mempolicy(2), mbind(2), set_mempolicy(2), numa(3), numa_maps(5), cpuset(7), numa(7), migratepages(8), numastat(8) Documentation/vm/page_migration.rst Linux () aereiae , Alexey , Azamat Hackimov , Dmitriy S. Seregin , Dmitry Bolkhovskikh , ITriskTI , Max Is , Yuri Kozlov , , Kirill Rekhov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () <>. Linux 6.9.1 2 2024 . migrate_pages(2)