[RFC PATCH 6/8] dax/kmem: add the demotion and numa_balancing opt-ins 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]>
Expose the two kernel-NUMA capabilities as separate per-device sysfs opt-ins:
'demotion' (NODE_PRIVATE_CAP_DEMOTION) and 'numa_balancing'
(NODE_PRIVATE_CAP_NUMA_BALANCING).  demotion additionally requires reclaim,
enforced at hotplug by node_private_register().

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

diff --git a/drivers/dax/kmem.c b/drivers/dax/kmem.c
index 3892ad44d4e46..1cb3384c003e3 100644
--- a/drivers/dax/kmem.c
+++ b/drivers/dax/kmem.c
@@ -631,12 +631,16 @@ 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);
 KMEM_PRIVATE_CAP_ATTR(hotunplug, NODE_PRIVATE_CAP_HOTUNPLUG);
+KMEM_PRIVATE_CAP_ATTR(demotion, NODE_PRIVATE_CAP_DEMOTION);
+KMEM_PRIVATE_CAP_ATTR(numa_balancing, NODE_PRIVATE_CAP_NUMA_BALANCING);
 
 /* 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,
 	&dev_attr_hotunplug.attr,
+	&dev_attr_demotion.attr,
+	&dev_attr_numa_balancing.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.