@@ -482,6 +482,24 @@ closest to which page allocation will come from. Specifying the home node overri
the default allocation policy to allocate memory close to the local node for an
executing CPU.
+Extended Mempolicy Arguments::
+
+ struct mpol_args {
+ __u16 mode;
+ __u16 mode_flags;
+ __s32 home_node; /* mbind2: policy home node */
+ __aligned_u64 pol_nodes; /* nodemask pointer */
+ __u64 pol_maxnodes;
+ __s32 policy_node; /* get_mempolicy2: policy node information */
+ };
+
+The extended mempolicy argument structure is defined to allow the mempolicy
+interfaces future extensibility without the need for additional system calls.
+
+The core arguments (mode, mode_flags, pol_nodes, and pol_maxnodes) apply to
+all interfaces relative to their non-extended counterparts. Each additional
+field may only apply to specific extended interfaces. See the respective
+extended interface man page for more details.
Memory Policy Command Line Interface
====================================
@@ -74,6 +74,7 @@ struct landlock_ruleset_attr;
enum landlock_rule_type;
struct cachestat_range;
struct cachestat;
+struct mpol_args;
#include <linux/types.h>
#include <linux/aio_abi.h>
@@ -27,6 +27,16 @@ enum {
MPOL_MAX, /* always last member of enum */
};
+struct mpol_args {
+ /* Basic mempolicy settings */
+ __u16 mode;
+ __u16 mode_flags;
+ __s32 home_node; /* mbind2: policy home node */
+ __aligned_u64 pol_nodes;
+ __u64 pol_maxnodes;
+ __s32 policy_node; /* get_mempolicy: policy node info */
+};
+
/* Flags for set_mempolicy */
#define MPOL_F_STATIC_NODES (1 << 15)
#define MPOL_F_RELATIVE_NODES (1 << 14)