[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250512142511.3959833-1-joshua.hahnjy@gmail.com>
Date: Mon, 12 May 2025 07:25:10 -0700
From: Joshua Hahn <joshua.hahnjy@...il.com>
To: "Huang, Ying" <ying.huang@...ux.alibaba.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
gourry@...rry.net,
honggyu.kim@...com,
yunjeong.mun@...com,
gregkh@...uxfoundation.org,
rafael@...nel.org,
lenb@...nel.org,
dan.j.williams@...el.com,
Jonathan.Cameron@...wei.com,
dave.jiang@...el.com,
horen.chuang@...ux.dev,
hannes@...xchg.org,
osalvador@...e.de,
linux-kernel@...r.kernel.org,
linux-acpi@...r.kernel.org,
linux-mm@...ck.org,
kernel-team@...a.com
Subject: Re: [PATCH v8] mm/mempolicy: Weighted Interleave Auto-tuning
On Mon, 12 May 2025 09:35:16 +0800 "Huang, Ying" <ying.huang@...ux.alibaba.com> wrote:
> Hi, Joshua,
>
> Joshua Hahn <joshua.hahnjy@...il.com> writes:
>
> [snip]
>
> > @@ -3707,8 +3720,12 @@ static void wi_state_free(void)
> > kfree(&wi_group->wi_kobj);
> > }
> >
> > +static struct kobj_attribute wi_auto_attr =
> > + __ATTR(auto, 0664, weighted_interleave_auto_show,
> > + weighted_interleave_auto_store);
> > +
> > static void wi_cleanup(void) {
> > - sysfs_remove_file(&wi_group->wi_kobj, &wi_group->auto_kobj_attr.attr);
> > + sysfs_remove_file(&wi_group->wi_kobj, &wi_auto_attr.attr);
>
> If we use wi_auto_attr directly here, we can remove auto_kobj_attr field
> from struct sysfs_wi_group?
Hi Ying, thank you for this comment. I should have caught it as well.
Removing the last users / setters doesn't seem complicated.
Andrew, I'm very sorry -- do you think you can fold this fixlet in as well?
This is a minor change that removes the only users of this variable.
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index d5ae36d2eda8..8581cc861945 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -3543,7 +3543,6 @@ struct iw_node_attr {
struct sysfs_wi_group {
struct kobject wi_kobj;
struct mutex kobj_lock;
- struct kobj_attribute auto_kobj_attr;
struct iw_node_attr *nattrs[];
};
@@ -3833,7 +3832,6 @@ static int __init add_weighted_interleave_group(struct kobject *mempolicy_kobj)
err = sysfs_create_file(&wi_group->wi_kobj, &wi_auto_attr.attr);
if (err)
goto err_put_kobj;
- wi_group->auto_kobj_attr = wi_auto_attr
for_each_online_node(nid) {
if (!node_state(nid, N_MEMORY))
Thank you both, I hope you have a great day!
Joshua
Powered by blists - more mailing lists