* [PATCH v5 1/3] mm/mempolicy: Fix memory leaks in weighted interleave sysfs
2025-04-02 1:49 [PATCH v5 0/3] Enhance sysfs handling for memory hotplug in weighted interleave Rakie Kim
@ 2025-04-02 1:49 ` Rakie Kim
2025-04-02 1:49 ` [PATCH v5 2/3] mm/mempolicy: Support dynamic sysfs updates for weighted interleave Rakie Kim
2025-04-02 1:49 ` [PATCH v5 3/3] mm/mempolicy: Support memory hotplug in " Rakie Kim
2 siblings, 0 replies; 15+ messages in thread
From: Rakie Kim @ 2025-04-02 1:49 UTC (permalink / raw)
To: gourry
Cc: akpm, linux-mm, linux-kernel, linux-cxl, joshua.hahnjy,
dan.j.williams, ying.huang, david, Jonathan.Cameron, kernel_team,
honggyu.kim, yunjeong.mun, rakie.kim
Memory leaks occurred when removing sysfs attributes for weighted
interleave. Improper kobject deallocation led to unreleased memory
when initialization failed or when nodes were removed.
This patch resolves the issue by replacing unnecessary `kfree()`
calls with `kobject_put()`, ensuring proper cleanup and preventing
memory leaks.
By correctly using `kobject_put()`, the release function now
properly deallocates memory without causing resource leaks,
thereby improving system stability.
Fixes: dce41f5ae253 ("mm/mempolicy: implement the sysfs-based weighted_interleave interface")
Signed-off-by: Rakie Kim <rakie.kim@sk.com>
Signed-off-by: Honggyu Kim <honggyu.kim@sk.com>
Signed-off-by: Yunjeong Mun <yunjeong.mun@sk.com>
Reviewed-by: Gregory Price <gourry@gourry.net>
---
mm/mempolicy.c | 61 +++++++++++++++++++++++++-------------------------
1 file changed, 31 insertions(+), 30 deletions(-)
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index bbaadbeeb291..5950d5d5b85e 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -3448,7 +3448,9 @@ static void sysfs_wi_release(struct kobject *wi_kobj)
for (i = 0; i < nr_node_ids; i++)
sysfs_wi_node_release(node_attrs[i], wi_kobj);
- kobject_put(wi_kobj);
+
+ kfree(node_attrs);
+ kfree(wi_kobj);
}
static const struct kobj_type wi_ktype = {
@@ -3494,15 +3496,22 @@ static int add_weighted_interleave_group(struct kobject *root_kobj)
struct kobject *wi_kobj;
int nid, err;
- wi_kobj = kzalloc(sizeof(struct kobject), GFP_KERNEL);
- if (!wi_kobj)
+ node_attrs = kcalloc(nr_node_ids, sizeof(struct iw_node_attr *),
+ GFP_KERNEL);
+ if (!node_attrs)
return -ENOMEM;
+ wi_kobj = kzalloc(sizeof(struct kobject), GFP_KERNEL);
+ if (!wi_kobj) {
+ err = -ENOMEM;
+ goto node_out;
+ }
+
err = kobject_init_and_add(wi_kobj, &wi_ktype, root_kobj,
"weighted_interleave");
if (err) {
- kfree(wi_kobj);
- return err;
+ kobject_put(wi_kobj);
+ goto err_out;
}
for_each_node_state(nid, N_POSSIBLE) {
@@ -3512,9 +3521,17 @@ static int add_weighted_interleave_group(struct kobject *root_kobj)
break;
}
}
- if (err)
+ if (err) {
kobject_put(wi_kobj);
+ goto err_out;
+ }
+
return 0;
+
+node_out:
+ kfree(node_attrs);
+err_out:
+ return err;
}
static void mempolicy_kobj_release(struct kobject *kobj)
@@ -3528,7 +3545,6 @@ static void mempolicy_kobj_release(struct kobject *kobj)
mutex_unlock(&iw_table_lock);
synchronize_rcu();
kfree(old);
- kfree(node_attrs);
kfree(kobj);
}
@@ -3542,37 +3558,22 @@ static int __init mempolicy_sysfs_init(void)
static struct kobject *mempolicy_kobj;
mempolicy_kobj = kzalloc(sizeof(*mempolicy_kobj), GFP_KERNEL);
- if (!mempolicy_kobj) {
- err = -ENOMEM;
- goto err_out;
- }
-
- node_attrs = kcalloc(nr_node_ids, sizeof(struct iw_node_attr *),
- GFP_KERNEL);
- if (!node_attrs) {
- err = -ENOMEM;
- goto mempol_out;
- }
+ if (!mempolicy_kobj)
+ return -ENOMEM;
err = kobject_init_and_add(mempolicy_kobj, &mempolicy_ktype, mm_kobj,
"mempolicy");
if (err)
- goto node_out;
+ goto err_out;
err = add_weighted_interleave_group(mempolicy_kobj);
- if (err) {
- pr_err("mempolicy sysfs structure failed to initialize\n");
- kobject_put(mempolicy_kobj);
- return err;
- }
+ if (err)
+ goto err_out;
+
+ return 0;
- return err;
-node_out:
- kfree(node_attrs);
-mempol_out:
- kfree(mempolicy_kobj);
err_out:
- pr_err("failed to add mempolicy kobject to the system\n");
+ kobject_put(mempolicy_kobj);
return err;
}
--
2.34.1
^ permalink raw reply [flat|nested] 15+ messages in thread* [PATCH v5 2/3] mm/mempolicy: Support dynamic sysfs updates for weighted interleave
2025-04-02 1:49 [PATCH v5 0/3] Enhance sysfs handling for memory hotplug in weighted interleave Rakie Kim
2025-04-02 1:49 ` [PATCH v5 1/3] mm/mempolicy: Fix memory leaks in weighted interleave sysfs Rakie Kim
@ 2025-04-02 1:49 ` Rakie Kim
2025-04-02 1:49 ` [PATCH v5 3/3] mm/mempolicy: Support memory hotplug in " Rakie Kim
2 siblings, 0 replies; 15+ messages in thread
From: Rakie Kim @ 2025-04-02 1:49 UTC (permalink / raw)
To: gourry
Cc: akpm, linux-mm, linux-kernel, linux-cxl, joshua.hahnjy,
dan.j.williams, ying.huang, david, Jonathan.Cameron, kernel_team,
honggyu.kim, yunjeong.mun, rakie.kim
Previously, the weighted interleave sysfs structure was statically
managed, preventing dynamic updates when nodes were added or removed.
This patch restructures the weighted interleave sysfs to support
dynamic insertion and deletion. The sysfs that was part of
the 'weighted_interleave_group' is now globally accessible,
allowing external access to that sysfs.
With this change, sysfs management for weighted interleave is
more flexible, supporting hotplug events and runtime updates
more effectively.
Signed-off-by: Rakie Kim <rakie.kim@sk.com>
Signed-off-by: Honggyu Kim <honggyu.kim@sk.com>
Signed-off-by: Yunjeong Mun <yunjeong.mun@sk.com>
Reviewed-by: Gregory Price <gourry@gourry.net>
---
mm/mempolicy.c | 71 ++++++++++++++++++++++----------------------------
1 file changed, 31 insertions(+), 40 deletions(-)
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 5950d5d5b85e..3092a792bd28 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -3388,6 +3388,13 @@ struct iw_node_attr {
int nid;
};
+struct sysfs_wi_group {
+ struct kobject wi_kobj;
+ struct iw_node_attr *nattrs[];
+};
+
+static struct sysfs_wi_group *wi_group;
+
static ssize_t node_show(struct kobject *kobj, struct kobj_attribute *attr,
char *buf)
{
@@ -3430,27 +3437,24 @@ static ssize_t node_store(struct kobject *kobj, struct kobj_attribute *attr,
return count;
}
-static struct iw_node_attr **node_attrs;
-
-static void sysfs_wi_node_release(struct iw_node_attr *node_attr,
- struct kobject *parent)
+static void sysfs_wi_node_release(int nid)
{
- if (!node_attr)
+ if (!wi_group->nattrs[nid])
return;
- sysfs_remove_file(parent, &node_attr->kobj_attr.attr);
- kfree(node_attr->kobj_attr.attr.name);
- kfree(node_attr);
+
+ sysfs_remove_file(&wi_group->wi_kobj,
+ &wi_group->nattrs[nid]->kobj_attr.attr);
+ kfree(wi_group->nattrs[nid]->kobj_attr.attr.name);
+ kfree(wi_group->nattrs[nid]);
}
static void sysfs_wi_release(struct kobject *wi_kobj)
{
- int i;
-
- for (i = 0; i < nr_node_ids; i++)
- sysfs_wi_node_release(node_attrs[i], wi_kobj);
+ int nid;
- kfree(node_attrs);
- kfree(wi_kobj);
+ for (nid = 0; nid < nr_node_ids; nid++)
+ sysfs_wi_node_release(nid);
+ kfree(wi_group);
}
static const struct kobj_type wi_ktype = {
@@ -3458,7 +3462,7 @@ static const struct kobj_type wi_ktype = {
.release = sysfs_wi_release,
};
-static int add_weight_node(int nid, struct kobject *wi_kobj)
+static int sysfs_wi_node_add(int nid)
{
struct iw_node_attr *node_attr;
char *name;
@@ -3480,57 +3484,44 @@ static int add_weight_node(int nid, struct kobject *wi_kobj)
node_attr->kobj_attr.store = node_store;
node_attr->nid = nid;
- if (sysfs_create_file(wi_kobj, &node_attr->kobj_attr.attr)) {
+ if (sysfs_create_file(&wi_group->wi_kobj, &node_attr->kobj_attr.attr)) {
kfree(node_attr->kobj_attr.attr.name);
kfree(node_attr);
pr_err("failed to add attribute to weighted_interleave\n");
return -ENOMEM;
}
- node_attrs[nid] = node_attr;
+ wi_group->nattrs[nid] = node_attr;
return 0;
}
-static int add_weighted_interleave_group(struct kobject *root_kobj)
+static int add_weighted_interleave_group(struct kobject *mempolicy_kobj)
{
- struct kobject *wi_kobj;
int nid, err;
- node_attrs = kcalloc(nr_node_ids, sizeof(struct iw_node_attr *),
- GFP_KERNEL);
- if (!node_attrs)
+ wi_group = kzalloc(sizeof(struct sysfs_wi_group) + \
+ nr_node_ids * sizeof(struct iw_node_attr *), \
+ GFP_KERNEL);
+ if (!wi_group)
return -ENOMEM;
- wi_kobj = kzalloc(sizeof(struct kobject), GFP_KERNEL);
- if (!wi_kobj) {
- err = -ENOMEM;
- goto node_out;
- }
-
- err = kobject_init_and_add(wi_kobj, &wi_ktype, root_kobj,
+ err = kobject_init_and_add(&wi_group->wi_kobj, &wi_ktype, mempolicy_kobj,
"weighted_interleave");
- if (err) {
- kobject_put(wi_kobj);
+ if (err)
goto err_out;
- }
for_each_node_state(nid, N_POSSIBLE) {
- err = add_weight_node(nid, wi_kobj);
+ err = sysfs_wi_node_add(nid);
if (err) {
pr_err("failed to add sysfs [node%d]\n", nid);
- break;
+ goto err_out;
}
}
- if (err) {
- kobject_put(wi_kobj);
- goto err_out;
- }
return 0;
-node_out:
- kfree(node_attrs);
err_out:
+ kobject_put(&wi_group->wi_kobj);
return err;
}
--
2.34.1
^ permalink raw reply [flat|nested] 15+ messages in thread* [PATCH v5 3/3] mm/mempolicy: Support memory hotplug in weighted interleave
2025-04-02 1:49 [PATCH v5 0/3] Enhance sysfs handling for memory hotplug in weighted interleave Rakie Kim
2025-04-02 1:49 ` [PATCH v5 1/3] mm/mempolicy: Fix memory leaks in weighted interleave sysfs Rakie Kim
2025-04-02 1:49 ` [PATCH v5 2/3] mm/mempolicy: Support dynamic sysfs updates for weighted interleave Rakie Kim
@ 2025-04-02 1:49 ` Rakie Kim
2025-04-02 4:18 ` Honggyu Kim
2025-04-02 9:51 ` Oscar Salvador
2 siblings, 2 replies; 15+ messages in thread
From: Rakie Kim @ 2025-04-02 1:49 UTC (permalink / raw)
To: gourry
Cc: akpm, linux-mm, linux-kernel, linux-cxl, joshua.hahnjy,
dan.j.williams, ying.huang, david, Jonathan.Cameron, kernel_team,
honggyu.kim, yunjeong.mun, rakie.kim
The weighted interleave policy distributes page allocations across multiple
NUMA nodes based on their performance weight, thereby improving memory
bandwidth utilization. The weight values for each node are configured
through sysfs.
Previously, sysfs entries for configuring weighted interleave were created
for all possible nodes (N_POSSIBLE) at initialization, including nodes that
might not have memory. However, not all nodes in N_POSSIBLE are usable at
runtime, as some may remain memoryless or offline.
This led to sysfs entries being created for unusable nodes, causing
potential misconfiguration issues.
To address this issue, this patch modifies the sysfs creation logic to:
1) Limit sysfs entries to nodes that are online and have memory, avoiding
the creation of sysfs entries for nodes that cannot be used.
2) Support memory hotplug by dynamically adding and removing sysfs entries
based on whether a node transitions into or out of the N_MEMORY state.
Additionally, the patch ensures that sysfs attributes are properly managed
when nodes go offline, preventing stale or redundant entries from persisting
in the system.
By making these changes, the weighted interleave policy now manages its
sysfs entries more efficiently, ensuring that only relevant nodes are
considered for interleaving, and dynamically adapting to memory hotplug
events.
Signed-off-by: Rakie Kim <rakie.kim@sk.com>
Signed-off-by: Honggyu Kim <honggyu.kim@sk.com>
Signed-off-by: Yunjeong Mun <yunjeong.mun@sk.com>
---
mm/mempolicy.c | 110 ++++++++++++++++++++++++++++++++++++++-----------
1 file changed, 87 insertions(+), 23 deletions(-)
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 3092a792bd28..ea4f3f3f2cdd 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -113,6 +113,7 @@
#include <asm/tlbflush.h>
#include <asm/tlb.h>
#include <linux/uaccess.h>
+#include <linux/memory.h>
#include "internal.h"
@@ -3390,6 +3391,7 @@ struct iw_node_attr {
struct sysfs_wi_group {
struct kobject wi_kobj;
+ struct mutex kobj_lock;
struct iw_node_attr *nattrs[];
};
@@ -3439,13 +3441,24 @@ static ssize_t node_store(struct kobject *kobj, struct kobj_attribute *attr,
static void sysfs_wi_node_release(int nid)
{
- if (!wi_group->nattrs[nid])
+ struct iw_node_attr *attr;
+
+ if (nid < 0 || nid >= nr_node_ids)
+ return;
+
+ mutex_lock(&wi_group->kobj_lock);
+ attr = wi_group->nattrs[nid];
+ if (!attr) {
+ mutex_unlock(&wi_group->kobj_lock);
return;
+ }
+
+ wi_group->nattrs[nid] = NULL;
+ mutex_unlock(&wi_group->kobj_lock);
- sysfs_remove_file(&wi_group->wi_kobj,
- &wi_group->nattrs[nid]->kobj_attr.attr);
- kfree(wi_group->nattrs[nid]->kobj_attr.attr.name);
- kfree(wi_group->nattrs[nid]);
+ sysfs_remove_file(&wi_group->wi_kobj, &attr->kobj_attr.attr);
+ kfree(attr->kobj_attr.attr.name);
+ kfree(attr);
}
static void sysfs_wi_release(struct kobject *wi_kobj)
@@ -3464,35 +3477,81 @@ static const struct kobj_type wi_ktype = {
static int sysfs_wi_node_add(int nid)
{
- struct iw_node_attr *node_attr;
+ int ret = 0;
char *name;
+ struct iw_node_attr *new_attr = NULL;
- node_attr = kzalloc(sizeof(*node_attr), GFP_KERNEL);
- if (!node_attr)
+ if (nid < 0 || nid >= nr_node_ids) {
+ pr_err("Invalid node id: %d\n", nid);
+ return -EINVAL;
+ }
+
+ new_attr = kzalloc(sizeof(struct iw_node_attr), GFP_KERNEL);
+ if (!new_attr)
return -ENOMEM;
name = kasprintf(GFP_KERNEL, "node%d", nid);
if (!name) {
- kfree(node_attr);
+ kfree(new_attr);
return -ENOMEM;
}
- sysfs_attr_init(&node_attr->kobj_attr.attr);
- node_attr->kobj_attr.attr.name = name;
- node_attr->kobj_attr.attr.mode = 0644;
- node_attr->kobj_attr.show = node_show;
- node_attr->kobj_attr.store = node_store;
- node_attr->nid = nid;
+ mutex_lock(&wi_group->kobj_lock);
+ if (wi_group->nattrs[nid]) {
+ mutex_unlock(&wi_group->kobj_lock);
+ pr_info("Node [%d] already exists\n", nid);
+ kfree(new_attr);
+ kfree(name);
+ return 0;
+ }
+ wi_group->nattrs[nid] = new_attr;
- if (sysfs_create_file(&wi_group->wi_kobj, &node_attr->kobj_attr.attr)) {
- kfree(node_attr->kobj_attr.attr.name);
- kfree(node_attr);
- pr_err("failed to add attribute to weighted_interleave\n");
- return -ENOMEM;
+ sysfs_attr_init(&wi_group->nattrs[nid]->kobj_attr.attr);
+ wi_group->nattrs[nid]->kobj_attr.attr.name = name;
+ wi_group->nattrs[nid]->kobj_attr.attr.mode = 0644;
+ wi_group->nattrs[nid]->kobj_attr.show = node_show;
+ wi_group->nattrs[nid]->kobj_attr.store = node_store;
+ wi_group->nattrs[nid]->nid = nid;
+
+ ret = sysfs_create_file(&wi_group->wi_kobj,
+ &wi_group->nattrs[nid]->kobj_attr.attr);
+ if (ret) {
+ kfree(wi_group->nattrs[nid]->kobj_attr.attr.name);
+ kfree(wi_group->nattrs[nid]);
+ wi_group->nattrs[nid] = NULL;
+ pr_err("Failed to add attribute to weighted_interleave: %d\n", ret);
}
+ mutex_unlock(&wi_group->kobj_lock);
- wi_group->nattrs[nid] = node_attr;
- return 0;
+ return ret;
+}
+
+static int wi_node_notifier(struct notifier_block *nb,
+ unsigned long action, void *data)
+{
+ int err;
+ struct memory_notify *arg = data;
+ int nid = arg->status_change_nid;
+
+ if (nid < 0)
+ goto notifier_end;
+
+ switch(action) {
+ case MEM_ONLINE:
+ err = sysfs_wi_node_add(nid);
+ if (err) {
+ pr_err("failed to add sysfs [node%d]\n", nid);
+ return NOTIFY_BAD;
+ }
+ break;
+ case MEM_OFFLINE:
+ if (!node_state(nid, N_MEMORY))
+ sysfs_wi_node_release(nid);
+ break;
+ }
+
+notifier_end:
+ return NOTIFY_OK;
}
static int add_weighted_interleave_group(struct kobject *mempolicy_kobj)
@@ -3504,13 +3563,17 @@ static int add_weighted_interleave_group(struct kobject *mempolicy_kobj)
GFP_KERNEL);
if (!wi_group)
return -ENOMEM;
+ mutex_init(&wi_group->kobj_lock);
err = kobject_init_and_add(&wi_group->wi_kobj, &wi_ktype, mempolicy_kobj,
"weighted_interleave");
if (err)
goto err_out;
- for_each_node_state(nid, N_POSSIBLE) {
+ for_each_online_node(nid) {
+ if (!node_state(nid, N_MEMORY))
+ continue;
+
err = sysfs_wi_node_add(nid);
if (err) {
pr_err("failed to add sysfs [node%d]\n", nid);
@@ -3518,6 +3581,7 @@ static int add_weighted_interleave_group(struct kobject *mempolicy_kobj)
}
}
+ hotplug_memory_notifier(wi_node_notifier, DEFAULT_CALLBACK_PRI);
return 0;
err_out:
--
2.34.1
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [PATCH v5 3/3] mm/mempolicy: Support memory hotplug in weighted interleave
2025-04-02 1:49 ` [PATCH v5 3/3] mm/mempolicy: Support memory hotplug in " Rakie Kim
@ 2025-04-02 4:18 ` Honggyu Kim
2025-04-02 4:34 ` Andrew Morton
2025-04-02 9:51 ` Oscar Salvador
1 sibling, 1 reply; 15+ messages in thread
From: Honggyu Kim @ 2025-04-02 4:18 UTC (permalink / raw)
To: Rakie Kim, gourry
Cc: kernel_team, akpm, linux-mm, linux-kernel, linux-cxl,
joshua.hahnjy, dan.j.williams, ying.huang, david,
Jonathan.Cameron, yunjeong.mun
Hi Rakie,
This is to fix the following broken status.
https://lore.kernel.org/linux-mm/b8ac8654-92bd-4c08-a3fc-e28a7be5e0e6@sk.com
So we must add the following tag for this patch.
Fixes: fa3bea4e1f82 ("mm/mempolicy: introduce MPOL_WEIGHTED_INTERLEAVE for
weighted interleaving")
Hi Gregory,
This patch is already in Andrew's tree. Is the current version okay for you?
Hi Andrew,
I'm not sure if this is going to the final version but could you please add this
patch to stable with Cc: <stable@vger.kernel.org>?
We might need to bring the whole series to avoid conflicts to stable tree.
Thanks,
Honggyu
On 4/2/2025 10:49 AM, Rakie Kim wrote:
> The weighted interleave policy distributes page allocations across multiple
> NUMA nodes based on their performance weight, thereby improving memory
> bandwidth utilization. The weight values for each node are configured
> through sysfs.
>
> Previously, sysfs entries for configuring weighted interleave were created
> for all possible nodes (N_POSSIBLE) at initialization, including nodes that
> might not have memory. However, not all nodes in N_POSSIBLE are usable at
> runtime, as some may remain memoryless or offline.
> This led to sysfs entries being created for unusable nodes, causing
> potential misconfiguration issues.
>
> To address this issue, this patch modifies the sysfs creation logic to:
> 1) Limit sysfs entries to nodes that are online and have memory, avoiding
> the creation of sysfs entries for nodes that cannot be used.
> 2) Support memory hotplug by dynamically adding and removing sysfs entries
> based on whether a node transitions into or out of the N_MEMORY state.
>
> Additionally, the patch ensures that sysfs attributes are properly managed
> when nodes go offline, preventing stale or redundant entries from persisting
> in the system.
>
> By making these changes, the weighted interleave policy now manages its
> sysfs entries more efficiently, ensuring that only relevant nodes are
> considered for interleaving, and dynamically adapting to memory hotplug
> events.
>
> Signed-off-by: Rakie Kim <rakie.kim@sk.com>
> Signed-off-by: Honggyu Kim <honggyu.kim@sk.com>
> Signed-off-by: Yunjeong Mun <yunjeong.mun@sk.com>
> ---
> mm/mempolicy.c | 110 ++++++++++++++++++++++++++++++++++++++-----------
> 1 file changed, 87 insertions(+), 23 deletions(-)
>
> diff --git a/mm/mempolicy.c b/mm/mempolicy.c
> index 3092a792bd28..ea4f3f3f2cdd 100644
> --- a/mm/mempolicy.c
> +++ b/mm/mempolicy.c
> @@ -113,6 +113,7 @@
> #include <asm/tlbflush.h>
> #include <asm/tlb.h>
> #include <linux/uaccess.h>
> +#include <linux/memory.h>
>
> #include "internal.h"
>
> @@ -3390,6 +3391,7 @@ struct iw_node_attr {
>
> struct sysfs_wi_group {
> struct kobject wi_kobj;
> + struct mutex kobj_lock;
> struct iw_node_attr *nattrs[];
> };
>
> @@ -3439,13 +3441,24 @@ static ssize_t node_store(struct kobject *kobj, struct kobj_attribute *attr,
>
> static void sysfs_wi_node_release(int nid)
> {
> - if (!wi_group->nattrs[nid])
> + struct iw_node_attr *attr;
> +
> + if (nid < 0 || nid >= nr_node_ids)
> + return;
> +
> + mutex_lock(&wi_group->kobj_lock);
> + attr = wi_group->nattrs[nid];
> + if (!attr) {
> + mutex_unlock(&wi_group->kobj_lock);
> return;
> + }
> +
> + wi_group->nattrs[nid] = NULL;
> + mutex_unlock(&wi_group->kobj_lock);
>
> - sysfs_remove_file(&wi_group->wi_kobj,
> - &wi_group->nattrs[nid]->kobj_attr.attr);
> - kfree(wi_group->nattrs[nid]->kobj_attr.attr.name);
> - kfree(wi_group->nattrs[nid]);
> + sysfs_remove_file(&wi_group->wi_kobj, &attr->kobj_attr.attr);
> + kfree(attr->kobj_attr.attr.name);
> + kfree(attr);
> }
>
> static void sysfs_wi_release(struct kobject *wi_kobj)
> @@ -3464,35 +3477,81 @@ static const struct kobj_type wi_ktype = {
>
> static int sysfs_wi_node_add(int nid)
> {
> - struct iw_node_attr *node_attr;
> + int ret = 0;
> char *name;
> + struct iw_node_attr *new_attr = NULL;
>
> - node_attr = kzalloc(sizeof(*node_attr), GFP_KERNEL);
> - if (!node_attr)
> + if (nid < 0 || nid >= nr_node_ids) {
> + pr_err("Invalid node id: %d\n", nid);
> + return -EINVAL;
> + }
> +
> + new_attr = kzalloc(sizeof(struct iw_node_attr), GFP_KERNEL);
> + if (!new_attr)
> return -ENOMEM;
>
> name = kasprintf(GFP_KERNEL, "node%d", nid);
> if (!name) {
> - kfree(node_attr);
> + kfree(new_attr);
> return -ENOMEM;
> }
>
> - sysfs_attr_init(&node_attr->kobj_attr.attr);
> - node_attr->kobj_attr.attr.name = name;
> - node_attr->kobj_attr.attr.mode = 0644;
> - node_attr->kobj_attr.show = node_show;
> - node_attr->kobj_attr.store = node_store;
> - node_attr->nid = nid;
> + mutex_lock(&wi_group->kobj_lock);
> + if (wi_group->nattrs[nid]) {
> + mutex_unlock(&wi_group->kobj_lock);
> + pr_info("Node [%d] already exists\n", nid);
> + kfree(new_attr);
> + kfree(name);
> + return 0;
> + }
> + wi_group->nattrs[nid] = new_attr;
>
> - if (sysfs_create_file(&wi_group->wi_kobj, &node_attr->kobj_attr.attr)) {
> - kfree(node_attr->kobj_attr.attr.name);
> - kfree(node_attr);
> - pr_err("failed to add attribute to weighted_interleave\n");
> - return -ENOMEM;
> + sysfs_attr_init(&wi_group->nattrs[nid]->kobj_attr.attr);
> + wi_group->nattrs[nid]->kobj_attr.attr.name = name;
> + wi_group->nattrs[nid]->kobj_attr.attr.mode = 0644;
> + wi_group->nattrs[nid]->kobj_attr.show = node_show;
> + wi_group->nattrs[nid]->kobj_attr.store = node_store;
> + wi_group->nattrs[nid]->nid = nid;
> +
> + ret = sysfs_create_file(&wi_group->wi_kobj,
> + &wi_group->nattrs[nid]->kobj_attr.attr);
> + if (ret) {
> + kfree(wi_group->nattrs[nid]->kobj_attr.attr.name);
> + kfree(wi_group->nattrs[nid]);
> + wi_group->nattrs[nid] = NULL;
> + pr_err("Failed to add attribute to weighted_interleave: %d\n", ret);
> }
> + mutex_unlock(&wi_group->kobj_lock);
>
> - wi_group->nattrs[nid] = node_attr;
> - return 0;
> + return ret;
> +}
> +
> +static int wi_node_notifier(struct notifier_block *nb,
> + unsigned long action, void *data)
> +{
> + int err;
> + struct memory_notify *arg = data;
> + int nid = arg->status_change_nid;
> +
> + if (nid < 0)
> + goto notifier_end;
> +
> + switch(action) {
> + case MEM_ONLINE:
> + err = sysfs_wi_node_add(nid);
> + if (err) {
> + pr_err("failed to add sysfs [node%d]\n", nid);
> + return NOTIFY_BAD;
> + }
> + break;
> + case MEM_OFFLINE:
> + if (!node_state(nid, N_MEMORY))
> + sysfs_wi_node_release(nid);
> + break;
> + }
> +
> +notifier_end:
> + return NOTIFY_OK;
> }
>
> static int add_weighted_interleave_group(struct kobject *mempolicy_kobj)
> @@ -3504,13 +3563,17 @@ static int add_weighted_interleave_group(struct kobject *mempolicy_kobj)
> GFP_KERNEL);
> if (!wi_group)
> return -ENOMEM;
> + mutex_init(&wi_group->kobj_lock);
>
> err = kobject_init_and_add(&wi_group->wi_kobj, &wi_ktype, mempolicy_kobj,
> "weighted_interleave");
> if (err)
> goto err_out;
>
> - for_each_node_state(nid, N_POSSIBLE) {
> + for_each_online_node(nid) {
> + if (!node_state(nid, N_MEMORY))
> + continue;
> +
> err = sysfs_wi_node_add(nid);
> if (err) {
> pr_err("failed to add sysfs [node%d]\n", nid);
> @@ -3518,6 +3581,7 @@ static int add_weighted_interleave_group(struct kobject *mempolicy_kobj)
> }
> }
>
> + hotplug_memory_notifier(wi_node_notifier, DEFAULT_CALLBACK_PRI);
> return 0;
>
> err_out:
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [PATCH v5 3/3] mm/mempolicy: Support memory hotplug in weighted interleave
2025-04-02 4:18 ` Honggyu Kim
@ 2025-04-02 4:34 ` Andrew Morton
2025-04-02 5:15 ` Gregory Price
0 siblings, 1 reply; 15+ messages in thread
From: Andrew Morton @ 2025-04-02 4:34 UTC (permalink / raw)
To: Honggyu Kim
Cc: Rakie Kim, gourry, kernel_team, linux-mm, linux-kernel,
linux-cxl, joshua.hahnjy, dan.j.williams, ying.huang, david,
Jonathan.Cameron, yunjeong.mun
On Wed, 2 Apr 2025 13:18:51 +0900 Honggyu Kim <honggyu.kim@sk.com> wrote:
> This is to fix the following broken status.
> https://lore.kernel.org/linux-mm/b8ac8654-92bd-4c08-a3fc-e28a7be5e0e6@sk.com
>
> So we must add the following tag for this patch.
> Fixes: fa3bea4e1f82 ("mm/mempolicy: introduce MPOL_WEIGHTED_INTERLEAVE for
> weighted interleaving")
>
>
> Hi Gregory,
>
> This patch is already in Andrew's tree. Is the current version okay for you?
>
>
> Hi Andrew,
>
> I'm not sure if this is going to the final version but could you please add this
> patch to stable with Cc: <stable@vger.kernel.org>?
> We might need to bring the whole series to avoid conflicts to stable tree.
This is all rather confused.
Do we need to backport all three patches into -stable? If so, all three
should have Fixes:. Preferably they all have the same Fixes: so we
aren't backporting untested patch combinations.
I presently have:
Subject: mm/mempolicy: fix memory leaks in weighted interleave sysfs
Fixes: dce41f5ae253 ("mm/mempolicy: implement the sysfs-based weighted_interleave interface")
Cc: <stable@vger.kernel.org>
Subject: mm/mempolicy: support dynamic sysfs updates for weighted interleave
Cc: <stable@vger.kernel.org>
Subject: mm/mempolicy: support memory hotplug in weighted interleave
Fixes: fa3bea4e1f82 ("mm/mempolicy: introduce MPOL_WEIGHTED_INTERLEAVE for weighted interleaving")
Cc: <stable@vger.kernel.org>
[2/3] doesn't look like a fix.
Perhaps the whole thing should be redone: a two-patch bugfix series,
each with a Fixes: and a cc:stable and feature patch with neither a
Fixes: nor a cc:stable.
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [PATCH v5 3/3] mm/mempolicy: Support memory hotplug in weighted interleave
2025-04-02 4:34 ` Andrew Morton
@ 2025-04-02 5:15 ` Gregory Price
2025-04-02 5:23 ` Gregory Price
2025-04-02 5:32 ` Honggyu Kim
0 siblings, 2 replies; 15+ messages in thread
From: Gregory Price @ 2025-04-02 5:15 UTC (permalink / raw)
To: Andrew Morton
Cc: Honggyu Kim, Rakie Kim, kernel_team, linux-mm, linux-kernel,
linux-cxl, joshua.hahnjy, dan.j.williams, ying.huang, david,
Jonathan.Cameron, yunjeong.mun
On Tue, Apr 01, 2025 at 09:34:39PM -0700, Andrew Morton wrote:
> > I'm not sure if this is going to the final version but could you please add this
> > patch to stable with Cc: <stable@vger.kernel.org>?
> > We might need to bring the whole series to avoid conflicts to stable tree.
>
> This is all rather confused.
>
> Do we need to backport all three patches into -stable? If so, all three
> should have Fixes:. Preferably they all have the same Fixes: so we
> aren't backporting untested patch combinations.
>
I'd just as soon leave the entire thing out of stable backports.
Only the first patch actually fixes a bug (very small memory leak
during system tear down, so it's not even a critical bug). This could
be added to stable.
Patches 2 and 3 aren't fixes, they're desired behavioral changes
to the feature. An interface being confusing doesn't mean it's broken.
~Gregory
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v5 3/3] mm/mempolicy: Support memory hotplug in weighted interleave
2025-04-02 5:15 ` Gregory Price
@ 2025-04-02 5:23 ` Gregory Price
2025-04-02 5:32 ` Honggyu Kim
1 sibling, 0 replies; 15+ messages in thread
From: Gregory Price @ 2025-04-02 5:23 UTC (permalink / raw)
To: Andrew Morton
Cc: Honggyu Kim, Rakie Kim, kernel_team, linux-mm, linux-kernel,
linux-cxl, joshua.hahnjy, dan.j.williams, ying.huang, david,
Jonathan.Cameron, yunjeong.mun
On Wed, Apr 02, 2025 at 01:15:48AM -0400, Gregory Price wrote:
> On Tue, Apr 01, 2025 at 09:34:39PM -0700, Andrew Morton wrote:
> >
> > Do we need to backport all three patches into -stable? If so, all three
> > should have Fixes:. Preferably they all have the same Fixes: so we
> > aren't backporting untested patch combinations.
> >
>
> Patches 2 and 3 aren't fixes, they're desired behavioral changes
> to the feature. An interface being confusing doesn't mean it's broken.
>
Just some added clarity:
The behavioral change in sysfs change goes from N_POSSIBLE nodes always
being exposed - to sysfs entries coming and going as nodes transition
between having memory and not having memory.
I can see the argument for wanting this backported as a fix to ensure
userspace software is consistent across LTS.
So for backporting: all or nothing - and all the fixes tags should be
the same.
~Gregory
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v5 3/3] mm/mempolicy: Support memory hotplug in weighted interleave
2025-04-02 5:15 ` Gregory Price
2025-04-02 5:23 ` Gregory Price
@ 2025-04-02 5:32 ` Honggyu Kim
1 sibling, 0 replies; 15+ messages in thread
From: Honggyu Kim @ 2025-04-02 5:32 UTC (permalink / raw)
To: Gregory Price, Andrew Morton
Cc: kernel_team, Rakie Kim, linux-mm, linux-kernel, linux-cxl,
joshua.hahnjy, dan.j.williams, ying.huang, david,
Jonathan.Cameron, yunjeong.mun
Hi Gregory,
On 4/2/2025 2:15 PM, Gregory Price wrote:
> On Tue, Apr 01, 2025 at 09:34:39PM -0700, Andrew Morton wrote:
>>> I'm not sure if this is going to the final version but could you please add this
>>> patch to stable with Cc: <stable@vger.kernel.org>?
>>> We might need to bring the whole series to avoid conflicts to stable tree.
>>
>> This is all rather confused.
>>
>> Do we need to backport all three patches into -stable? If so, all three
>> should have Fixes:. Preferably they all have the same Fixes: so we
>> aren't backporting untested patch combinations.
>>
>
> I'd just as soon leave the entire thing out of stable backports.
>
> Only the first patch actually fixes a bug (very small memory leak
> during system tear down, so it's not even a critical bug). This could
> be added to stable.
>
> Patches 2 and 3 aren't fixes, they're desired behavioral changes
> to the feature. An interface being confusing doesn't mean it's broken.
I think those are fixes but I also agree that this is behavioral changes as
well. So I'm fine leaving these out of stable backports.
Hi Andrew,
I won't ask changes so please keep the current status as is. Sorry for making
confusion.
Thanks,
Honggyu
>
> ~Gregory
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v5 3/3] mm/mempolicy: Support memory hotplug in weighted interleave
2025-04-02 1:49 ` [PATCH v5 3/3] mm/mempolicy: Support memory hotplug in " Rakie Kim
2025-04-02 4:18 ` Honggyu Kim
@ 2025-04-02 9:51 ` Oscar Salvador
2025-04-02 14:14 ` Gregory Price
1 sibling, 1 reply; 15+ messages in thread
From: Oscar Salvador @ 2025-04-02 9:51 UTC (permalink / raw)
To: Rakie Kim
Cc: gourry, akpm, linux-mm, linux-kernel, linux-cxl, joshua.hahnjy,
dan.j.williams, ying.huang, david, Jonathan.Cameron, kernel_team,
honggyu.kim, yunjeong.mun
On Wed, Apr 02, 2025 at 10:49:04AM +0900, Rakie Kim wrote:
> The weighted interleave policy distributes page allocations across multiple
> NUMA nodes based on their performance weight, thereby improving memory
> bandwidth utilization. The weight values for each node are configured
> through sysfs.
>
> Previously, sysfs entries for configuring weighted interleave were created
> for all possible nodes (N_POSSIBLE) at initialization, including nodes that
> might not have memory. However, not all nodes in N_POSSIBLE are usable at
> runtime, as some may remain memoryless or offline.
> This led to sysfs entries being created for unusable nodes, causing
> potential misconfiguration issues.
>
> To address this issue, this patch modifies the sysfs creation logic to:
> 1) Limit sysfs entries to nodes that are online and have memory, avoiding
> the creation of sysfs entries for nodes that cannot be used.
> 2) Support memory hotplug by dynamically adding and removing sysfs entries
> based on whether a node transitions into or out of the N_MEMORY state.
>
> Additionally, the patch ensures that sysfs attributes are properly managed
> when nodes go offline, preventing stale or redundant entries from persisting
> in the system.
>
> By making these changes, the weighted interleave policy now manages its
> sysfs entries more efficiently, ensuring that only relevant nodes are
> considered for interleaving, and dynamically adapting to memory hotplug
> events.
>
> Signed-off-by: Rakie Kim <rakie.kim@sk.com>
> Signed-off-by: Honggyu Kim <honggyu.kim@sk.com>
> Signed-off-by: Yunjeong Mun <yunjeong.mun@sk.com>
Sorry to jump at v5, and maybe this was already discussed but:
> +static int wi_node_notifier(struct notifier_block *nb,
> + unsigned long action, void *data)
> +{
> + int err;
> + struct memory_notify *arg = data;
> + int nid = arg->status_change_nid;
> +
> + if (nid < 0)
> + goto notifier_end;
> +
> + switch(action) {
> + case MEM_ONLINE:
> + err = sysfs_wi_node_add(nid);
> + if (err) {
> + pr_err("failed to add sysfs [node%d]\n", nid);
> + return NOTIFY_BAD;
> + }
> + break;
> + case MEM_OFFLINE:
> + if (!node_state(nid, N_MEMORY))
> + sysfs_wi_node_release(nid);
This check is not needed.
If status_change_nid is different than NUMA_NO_NODE, it means that the memory
state of the numa node was effectively changed.
So doing:
case MEM_OFFLINE:
sysfs_wi_node_release(nid)
is enough.
--
Oscar Salvador
SUSE Labs
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [PATCH v5 3/3] mm/mempolicy: Support memory hotplug in weighted interleave
2025-04-02 9:51 ` Oscar Salvador
@ 2025-04-02 14:14 ` Gregory Price
2025-04-02 15:41 ` Oscar Salvador
0 siblings, 1 reply; 15+ messages in thread
From: Gregory Price @ 2025-04-02 14:14 UTC (permalink / raw)
To: Oscar Salvador
Cc: Rakie Kim, akpm, linux-mm, linux-kernel, linux-cxl,
joshua.hahnjy, dan.j.williams, ying.huang, david,
Jonathan.Cameron, kernel_team, honggyu.kim, yunjeong.mun
On Wed, Apr 02, 2025 at 11:51:17AM +0200, Oscar Salvador wrote:
> > + case MEM_OFFLINE:
> > + if (!node_state(nid, N_MEMORY))
> > + sysfs_wi_node_release(nid);
>
> This check is not needed.
>
> If status_change_nid is different than NUMA_NO_NODE, it means that the memory
> state of the numa node was effectively changed.
> So doing:
>
> case MEM_OFFLINE:
> sysfs_wi_node_release(nid)
>
> is enough.
offline_pages will call this callback unconditionally any time it's
called (and succeeds). If 2 dax devices online into the same node, it's
possible to offline one chunk of blocks without offlining the other
chunks of blocks - which is why we did the additional check.
~Gregory
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v5 3/3] mm/mempolicy: Support memory hotplug in weighted interleave
2025-04-02 14:14 ` Gregory Price
@ 2025-04-02 15:41 ` Oscar Salvador
2025-04-02 16:36 ` Gregory Price
0 siblings, 1 reply; 15+ messages in thread
From: Oscar Salvador @ 2025-04-02 15:41 UTC (permalink / raw)
To: Gregory Price
Cc: Rakie Kim, akpm, linux-mm, linux-kernel, linux-cxl,
joshua.hahnjy, dan.j.williams, ying.huang, david,
Jonathan.Cameron, kernel_team, honggyu.kim, yunjeong.mun
On Wed, Apr 02, 2025 at 10:14:42AM -0400, Gregory Price wrote:
> On Wed, Apr 02, 2025 at 11:51:17AM +0200, Oscar Salvador wrote:
> > > + case MEM_OFFLINE:
> > > + if (!node_state(nid, N_MEMORY))
> > > + sysfs_wi_node_release(nid);
> >
> > This check is not needed.
> >
> > If status_change_nid is different than NUMA_NO_NODE, it means that the memory
> > state of the numa node was effectively changed.
> > So doing:
> >
> > case MEM_OFFLINE:
> > sysfs_wi_node_release(nid)
> >
> > is enough.
>
> offline_pages will call this callback unconditionally any time it's
> called (and succeeds). If 2 dax devices online into the same node, it's
Yes, this callback will be called whenever {online,offline}_pages succeeds, but
status_change_nid will be != NUMA_NO_NODE IFF the node state changes.
And you already have the check
if (nid < 0)
goto out
at the beginning, which means that all {offline,online}_pages operation that
do not carry a numa node state change will be filtered out there.
Makes sense, or am I missing something?
--
Oscar Salvador
SUSE Labs
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [PATCH v5 3/3] mm/mempolicy: Support memory hotplug in weighted interleave
2025-04-02 15:41 ` Oscar Salvador
@ 2025-04-02 16:36 ` Gregory Price
2025-04-03 4:26 ` Rakie Kim
0 siblings, 1 reply; 15+ messages in thread
From: Gregory Price @ 2025-04-02 16:36 UTC (permalink / raw)
To: Oscar Salvador
Cc: Rakie Kim, akpm, linux-mm, linux-kernel, linux-cxl,
joshua.hahnjy, dan.j.williams, ying.huang, david,
Jonathan.Cameron, kernel_team, honggyu.kim, yunjeong.mun
On Wed, Apr 02, 2025 at 05:41:57PM +0200, Oscar Salvador wrote:
>
> Yes, this callback will be called whenever {online,offline}_pages succeeds, but
> status_change_nid will be != NUMA_NO_NODE IFF the node state changes.
> And you already have the check
>
> if (nid < 0)
> goto out
>
> at the beginning, which means that all {offline,online}_pages operation that
> do not carry a numa node state change will be filtered out there.
>
> Makes sense, or am I missing something?
>
Ah, you're quite right. That was difficult to see on the surface, so
the check in fact superfluous. No need for an extra version, can just
add a patch to squash and drop it.
~Gregory
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [PATCH v5 3/3] mm/mempolicy: Support memory hotplug in weighted interleave
2025-04-02 16:36 ` Gregory Price
@ 2025-04-03 4:26 ` Rakie Kim
2025-04-03 5:45 ` Rakie Kim
0 siblings, 1 reply; 15+ messages in thread
From: Rakie Kim @ 2025-04-03 4:26 UTC (permalink / raw)
To: Gregory Price
Cc: Rakie Kim, akpm, linux-mm, linux-kernel, linux-cxl,
joshua.hahnjy, dan.j.williams, ying.huang, david,
Jonathan.Cameron, kernel_team, honggyu.kim, yunjeong.mun,
Oscar Salvador
On Wed, 2 Apr 2025 12:36:24 -0400 Gregory Price <gourry@gourry.net> wrote:
> On Wed, Apr 02, 2025 at 05:41:57PM +0200, Oscar Salvador wrote:
> >
> > Yes, this callback will be called whenever {online,offline}_pages succeeds, but
> > status_change_nid will be != NUMA_NO_NODE IFF the node state changes.
> > And you already have the check
> >
> > if (nid < 0)
> > goto out
> >
> > at the beginning, which means that all {offline,online}_pages operation that
> > do not carry a numa node state change will be filtered out there.
> >
> > Makes sense, or am I missing something?
> >
>
> Ah, you're quite right. That was difficult to see on the surface, so
> the check in fact superfluous. No need for an extra version, can just
> add a patch to squash and drop it.
>
> ~Gregory
To Gregory and Oscar
As Oscar correctly pointed out, the check for
'if (!node_state(nid, N_MEMORY))' is unnecessary and should be removed.
Additionally, there are other suggestions from Dan Williams that should
be applied as well:
Link: https://lore.kernel.org/lkml/67ed66ef7c070_9dac294e0@dwillia2-xfh.jf.intel.com.notmuch/
I will incorporate all of these improvements and submit a new version (v6).
Rakie
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [PATCH v5 3/3] mm/mempolicy: Support memory hotplug in weighted interleave
2025-04-03 4:26 ` Rakie Kim
@ 2025-04-03 5:45 ` Rakie Kim
0 siblings, 0 replies; 15+ messages in thread
From: Rakie Kim @ 2025-04-03 5:45 UTC (permalink / raw)
To: akpm
Cc: Rakie Kim, linux-mm, linux-kernel, linux-cxl, joshua.hahnjy,
dan.j.williams, ying.huang, david, Jonathan.Cameron, kernel_team,
honggyu.kim, yunjeong.mun, Oscar Salvador, Gregory Price
On Thu, 3 Apr 2025 13:26:14 +0900 Rakie Kim <rakie.kim@sk.com> wrote:
> On Wed, 2 Apr 2025 12:36:24 -0400 Gregory Price <gourry@gourry.net> wrote:
> > On Wed, Apr 02, 2025 at 05:41:57PM +0200, Oscar Salvador wrote:
> > >
> > > Yes, this callback will be called whenever {online,offline}_pages succeeds, but
> > > status_change_nid will be != NUMA_NO_NODE IFF the node state changes.
> > > And you already have the check
> > >
> > > if (nid < 0)
> > > goto out
> > >
> > > at the beginning, which means that all {offline,online}_pages operation that
> > > do not carry a numa node state change will be filtered out there.
> > >
> > > Makes sense, or am I missing something?
> > >
> >
> > Ah, you're quite right. That was difficult to see on the surface, so
> > the check in fact superfluous. No need for an extra version, can just
> > add a patch to squash and drop it.
> >
> > ~Gregory
>
> To Gregory and Oscar
>
> As Oscar correctly pointed out, the check for
> 'if (!node_state(nid, N_MEMORY))' is unnecessary and should be removed.
>
> Additionally, there are other suggestions from Dan Williams that should
> be applied as well:
> Link: https://lore.kernel.org/lkml/67ed66ef7c070_9dac294e0@dwillia2-xfh.jf.intel.com.notmuch/
>
> I will incorporate all of these improvements and submit a new version (v6).
>
> Rakie
To Andrew
I sincerely apologize for the inconvenience. It appears that this commit
still requires additional corrections. I would appreciate it if you could
drop the changes you merged into -mm, mm-new branch yesterday.
<1>
The patch titled
Subject: mm/mempolicy: fix memory leaks in weighted interleave sysfs has been added to the -mm mm-new branch. Its filename is
mm-mempolicy-fix-memory-leaks-in-weighted-interleave-sysfs.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-mempolicy-fix-memory-leaks-in-weighted-interleave-sysfs.patch
<2>
The patch titled
Subject: mm/mempolicy: support dynamic sysfs updates for weighted interleave has been added to the -mm mm-new branch. Its filename is
mm-mempolicy-support-dynamic-sysfs-updates-for-weighted-interleave.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-mempolicy-support-dynamic-sysfs-updates-for-weighted-interleave.patch
<3>
The patch titled
Subject: mm/mempolicy: support memory hotplug in weighted interleave has been added to the -mm mm-new branch. Its filename is
mm-mempolicy-support-memory-hotplug-in-weighted-interleave.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-mempolicy-support-memory-hotplug-in-weighted-interleave.patch
Rakie
^ permalink raw reply [flat|nested] 15+ messages in thread