[RFC PATCH 4/8] dax/kmem: add the user_numa opt-in (CAP_USER_NUMA) for private nodes

Gregory Price <[email protected]>
Newsgroups org.kernel.vger.linux-cxl,dev.linux.lists.nvdimm,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Add the "user_numa" setting NODE_PRIVATE_CAP_USER_NUMA so userspace
may control residency on the node via mempolicy and migration.

Signed-off-by: Gregory Price <[email protected]>
---
 drivers/dax/kmem.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/dax/kmem.c b/drivers/dax/kmem.c
index cf6cb927e5ed5..8023db23e2f99 100644
--- a/drivers/dax/kmem.c
+++ b/drivers/dax/kmem.c
@@ -629,10 +629,12 @@ static ssize_t name##_store(struct device *dev,				\
 static DEVICE_ATTR_RW(name)
 
 KMEM_PRIVATE_CAP_ATTR(reclaim, NODE_PRIVATE_CAP_RECLAIM);
+KMEM_PRIVATE_CAP_ATTR(user_numa, NODE_PRIVATE_CAP_USER_NUMA);
 
 /* Per-service opt-ins. Visibility toggled by 'private' control */
 static struct attribute *dax_kmem_private_attrs[] = {
 	&dev_attr_reclaim.attr,
+	&dev_attr_user_numa.attr,
 	NULL,
 };
 static const struct attribute_group dax_kmem_private_group = {
-- 
2.53.0-Meta
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.