]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mm/mempolicy: wire up syscall set_mempolicy_home_node
authorAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Fri, 14 Jan 2022 22:08:21 +0000 (14:08 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 15 Jan 2022 14:30:30 +0000 (16:30 +0200)
Link: https://lkml.kernel.org/r/20211202123810.267175-4-aneesh.kumar@linux.ibm.com
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Cc: Ben Widawsky <ben.widawsky@intel.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Feng Tang <feng.tang@intel.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Huang Ying <ying.huang@intel.com>
Cc: <linux-api@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
21 files changed:
arch/alpha/kernel/syscalls/syscall.tbl
arch/arm/tools/syscall.tbl
arch/arm64/include/asm/unistd.h
arch/arm64/include/asm/unistd32.h
arch/ia64/kernel/syscalls/syscall.tbl
arch/m68k/kernel/syscalls/syscall.tbl
arch/microblaze/kernel/syscalls/syscall.tbl
arch/mips/kernel/syscalls/syscall_n32.tbl
arch/mips/kernel/syscalls/syscall_n64.tbl
arch/mips/kernel/syscalls/syscall_o32.tbl
arch/parisc/kernel/syscalls/syscall.tbl
arch/powerpc/kernel/syscalls/syscall.tbl
arch/s390/kernel/syscalls/syscall.tbl
arch/sh/kernel/syscalls/syscall.tbl
arch/sparc/kernel/syscalls/syscall.tbl
arch/x86/entry/syscalls/syscall_32.tbl
arch/x86/entry/syscalls/syscall_64.tbl
arch/xtensa/kernel/syscalls/syscall.tbl
include/linux/syscalls.h
include/uapi/asm-generic/unistd.h
kernel/sys_ni.c

index ca5a32228cd6e53d1f4dd04100b86f7514fd128a..3515bc4f16a4ff285dcfd4c4540e7709a1d43c6a 100644 (file)
 # 557 reserved for memfd_secret
 558    common  process_mrelease                sys_process_mrelease
 559    common  futex_waitv                     sys_futex_waitv
+560    common  set_mempolicy_home_node         sys_ni_syscall
index 543100151f2b9031247db586adb90d6e1bdc79ce..ac964612d8b0781f21891cd09a95955de0215288 100644 (file)
 # 447 reserved for memfd_secret
 448    common  process_mrelease                sys_process_mrelease
 449    common  futex_waitv                     sys_futex_waitv
+450    common  set_mempolicy_home_node         sys_set_mempolicy_home_node
index 6bdb5f5db438c4dd915375c78336c57300ea4f0c..4e65da3445c7aa09b30d926b249433034fd96b04 100644 (file)
@@ -38,7 +38,7 @@
 #define __ARM_NR_compat_set_tls                (__ARM_NR_COMPAT_BASE + 5)
 #define __ARM_NR_COMPAT_END            (__ARM_NR_COMPAT_BASE + 0x800)
 
-#define __NR_compat_syscalls           450
+#define __NR_compat_syscalls           451
 #endif
 
 #define __ARCH_WANT_SYS_CLONE
index 41ea1195e44bc770595c70aaf2fcb80ba51abb89..604a2053d00670b73c0da75a224d8aaf13828e25 100644 (file)
@@ -905,6 +905,8 @@ __SYSCALL(__NR_landlock_restrict_self, sys_landlock_restrict_self)
 __SYSCALL(__NR_process_mrelease, sys_process_mrelease)
 #define __NR_futex_waitv 449
 __SYSCALL(__NR_futex_waitv, sys_futex_waitv)
+#define __NR_set_mempolicy_home_node 450
+__SYSCALL(__NR_set_mempolicy_home_node, sys_set_mempolicy_home_node)
 
 /*
  * Please add new compat syscalls above this comment and update
index 707ae121f6d39173d5a8aa773ffdd2693077ef16..78b1d03e86e1dc1e7b71dbaaf2649d5e7e6c48cd 100644 (file)
 # 447 reserved for memfd_secret
 448    common  process_mrelease                sys_process_mrelease
 449    common  futex_waitv                     sys_futex_waitv
+450    common  set_mempolicy_home_node         sys_set_mempolicy_home_node
index 45bc32a41b903c638c7353e1dd5b07cd0575183f..b1f3940bc29816ec07a31483f2d6b716a8ba1e2c 100644 (file)
 # 447 reserved for memfd_secret
 448    common  process_mrelease                sys_process_mrelease
 449    common  futex_waitv                     sys_futex_waitv
+450    common  set_mempolicy_home_node         sys_set_mempolicy_home_node
index 2204bde3ce4a041ffe594026104d1f01640cc3c9..820145e473501ee97056beda9720991358cd3a52 100644 (file)
 # 447 reserved for memfd_secret
 448    common  process_mrelease                sys_process_mrelease
 449    common  futex_waitv                     sys_futex_waitv
+450    common  set_mempolicy_home_node         sys_set_mempolicy_home_node
index 72d02d363f36fe43d1d18806260a525868b09bfa..253ff994ed2eceddb1b20c9bf813aa9bcf49c48e 100644 (file)
 # 447 reserved for memfd_secret
 448    n32     process_mrelease                sys_process_mrelease
 449    n32     futex_waitv                     sys_futex_waitv
+450    n32     set_mempolicy_home_node         sys_set_mempolicy_home_node
index e2c481fcede6bd11a5bbd4b43c02b780be0de10b..3f1886ad9d8060b48522e5af59aeac2b61fbfd34 100644 (file)
 # 447 reserved for memfd_secret
 448    n64     process_mrelease                sys_process_mrelease
 449    n64     futex_waitv                     sys_futex_waitv
+450    common  set_mempolicy_home_node         sys_set_mempolicy_home_node
index 3714c97b2643962db70fa56f820c429524f7a661..8f243e35a7b209ff2771b283a5d8261c12b2345d 100644 (file)
 # 447 reserved for memfd_secret
 448    o32     process_mrelease                sys_process_mrelease
 449    o32     futex_waitv                     sys_futex_waitv
+450    o32     set_mempolicy_home_node         sys_set_mempolicy_home_node
index 358c000007553d3f9a2704b39fa412757e83d494..68b46fe2f17c5708ae74f1f68d0634f99b04ef57 100644 (file)
 # 447 reserved for memfd_secret
 448    common  process_mrelease                sys_process_mrelease
 449    common  futex_waitv                     sys_futex_waitv
+450    common  set_mempolicy_home_node         sys_set_mempolicy_home_node
index 15109af9d0754d5fcb6e455532944ef1a0a14e17..2600b4237292c78c44363159a02eaca9a2dd88c8 100644 (file)
 # 447 reserved for memfd_secret
 448    common  process_mrelease                sys_process_mrelease
 449    common  futex_waitv                     sys_futex_waitv
+450    nospu   set_mempolicy_home_node         sys_set_mempolicy_home_node
index ed9c5c2eafad700ce45ad0178837ed3d1c9204d1..799147658dee20dde3993818f977579429898e4d 100644 (file)
 # 447 reserved for memfd_secret
 448  common    process_mrelease        sys_process_mrelease            sys_process_mrelease
 449  common    futex_waitv             sys_futex_waitv                 sys_futex_waitv
+450  common    set_mempolicy_home_node sys_set_mempolicy_home_node     sys_set_mempolicy_home_node
index d9539d28bdaa1cb1670059901f6d83e1c183ce28..2de85c977f54f92c0b39b8e7bd47ffde52693ff4 100644 (file)
 # 447 reserved for memfd_secret
 448    common  process_mrelease                sys_process_mrelease
 449    common  futex_waitv                     sys_futex_waitv
+450    common  set_mempolicy_home_node         sys_set_mempolicy_home_node
index 46adabcb1720f69780a52cdc64e75bf77388db65..4398cc6fb68dd84955d3c3c7e8e10437ba2d5312 100644 (file)
 # 447 reserved for memfd_secret
 448    common  process_mrelease                sys_process_mrelease
 449    common  futex_waitv                     sys_futex_waitv
+450    common  set_mempolicy_home_node         sys_set_mempolicy_home_node
index 7e25543693de3e7b9edd4c91f32d65a91042ac5b..320480a8db4f834dfee790b9a41e5516a88674f6 100644 (file)
 447    i386    memfd_secret            sys_memfd_secret
 448    i386    process_mrelease        sys_process_mrelease
 449    i386    futex_waitv             sys_futex_waitv
+450    i386    set_mempolicy_home_node         sys_set_mempolicy_home_node
index fe8f8dd157b4d49c7daf6abc5441e1039603f126..c84d12608cd2de9e45f6cc166169cf70ecbf7518 100644 (file)
 447    common  memfd_secret            sys_memfd_secret
 448    common  process_mrelease        sys_process_mrelease
 449    common  futex_waitv             sys_futex_waitv
+450    common  set_mempolicy_home_node sys_set_mempolicy_home_node
 
 #
 # Due to a historical design error, certain syscalls are numbered differently
index 3e3e1a506bed1a8cc693a60637960640fe67812d..52c94ab5c2058c81d8104cead4a9a7defa680276 100644 (file)
 # 447 reserved for memfd_secret
 448    common  process_mrelease                sys_process_mrelease
 449    common  futex_waitv                     sys_futex_waitv
+450    common  set_mempolicy_home_node         sys_set_mempolicy_home_node
index 528a478dbda8ba60830d55b2d7e9392ebb46cb00..819c0cb00b6d337f68bc739e54df10f63e0551d7 100644 (file)
@@ -1057,6 +1057,9 @@ asmlinkage long sys_landlock_add_rule(int ruleset_fd, enum landlock_rule_type ru
                const void __user *rule_attr, __u32 flags);
 asmlinkage long sys_landlock_restrict_self(int ruleset_fd, __u32 flags);
 asmlinkage long sys_memfd_secret(unsigned int flags);
+asmlinkage long sys_set_mempolicy_home_node(unsigned long start, unsigned long len,
+                                           unsigned long home_node,
+                                           unsigned long flags);
 
 /*
  * Architecture-specific system calls
index 4557a8b6086f4ffe71eb65bba74effa9045aa681..1c48b0ae3ba30229ff3104b5c8258e1a70373475 100644 (file)
@@ -883,8 +883,11 @@ __SYSCALL(__NR_process_mrelease, sys_process_mrelease)
 #define __NR_futex_waitv 449
 __SYSCALL(__NR_futex_waitv, sys_futex_waitv)
 
+#define __NR_set_mempolicy_home_node 450
+__SYSCALL(__NR_set_mempolicy_home_node, sys_set_mempolicy_home_node)
+
 #undef __NR_syscalls
-#define __NR_syscalls 450
+#define __NR_syscalls 451
 
 /*
  * 32 bit systems traditionally used different
index d1944258cfc0138720658966395c485de06699c1..a492f159624fa2545dfc43b78337a6166bfece18 100644 (file)
@@ -297,6 +297,7 @@ COND_SYSCALL(get_mempolicy);
 COND_SYSCALL(set_mempolicy);
 COND_SYSCALL(migrate_pages);
 COND_SYSCALL(move_pages);
+COND_SYSCALL(set_mempolicy_home_node);
 
 COND_SYSCALL(perf_event_open);
 COND_SYSCALL(accept4);