From: "Huang, Ying" <ying.huang@linux.alibaba.com>
To: Joshua Hahn <joshua.hahnjy@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
gourry@gourry.net, honggyu.kim@sk.com, yunjeong.mun@sk.com,
gregkh@linuxfoundation.org, rafael@kernel.org, lenb@kernel.org,
dan.j.williams@intel.com, Jonathan.Cameron@huawei.com,
dave.jiang@intel.com, horen.chuang@linux.dev,
hannes@cmpxchg.org, osalvador@suse.de,
linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
linux-mm@kvack.org, kernel-team@meta.com
Subject: Re: [PATCH v8] mm/mempolicy: Weighted Interleave Auto-tuning
Date: Tue, 13 May 2025 09:41:10 +0800 [thread overview]
Message-ID: <87tt5puw21.fsf@DESKTOP-5N7EMDA> (raw)
In-Reply-To: <20250512142511.3959833-1-joshua.hahnjy@gmail.com> (Joshua Hahn's message of "Mon, 12 May 2025 07:25:10 -0700")
Joshua Hahn <joshua.hahnjy@gmail.com> writes:
> On Mon, 12 May 2025 09:35:16 +0800 "Huang, Ying" <ying.huang@linux.alibaba.com> wrote:
>
>> Hi, Joshua,
>>
>> Joshua Hahn <joshua.hahnjy@gmail.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!
Thanks! LGTM, please feel free to add my
Reviewed-by: Huang Ying <ying.huang@linux.alibaba.com>
---
Best Regards,
Huang, Ying
next prev parent reply other threads:[~2025-05-13 1:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-05 18:23 Joshua Hahn
2025-05-10 5:25 ` Huang, Ying
2025-05-10 18:51 ` Joshua Hahn
2025-05-11 2:58 ` Joshua Hahn
2025-05-11 12:56 ` Honggyu Kim
2025-05-12 14:14 ` Joshua Hahn
2025-05-16 4:37 ` Honggyu Kim
2025-05-16 14:43 ` Joshua Hahn
2025-05-17 8:26 ` Huang, Ying
2025-05-12 1:35 ` Huang, Ying
2025-05-12 14:25 ` Joshua Hahn
2025-05-12 22:29 ` Andrew Morton
2025-05-13 14:01 ` Joshua Hahn
2025-05-13 1:41 ` Huang, Ying [this message]
2025-05-13 13:59 ` Joshua Hahn
2025-05-19 1:56 ` Joshua Hahn
2025-05-19 22:31 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tt5puw21.fsf@DESKTOP-5N7EMDA \
--to=ying.huang@linux.alibaba.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=gourry@gourry.net \
--cc=gregkh@linuxfoundation.org \
--cc=hannes@cmpxchg.org \
--cc=honggyu.kim@sk.com \
--cc=horen.chuang@linux.dev \
--cc=joshua.hahnjy@gmail.com \
--cc=kernel-team@meta.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=osalvador@suse.de \
--cc=rafael@kernel.org \
--cc=yunjeong.mun@sk.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox