Re: [PATCH v8] mm/mempolicy: Weighted Interleave Auto-tuning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 13 May 2025 09:41:10 +0800 "Huang, Ying" <ying.huang@xxxxxxxxxxxxxxxxx> wrote:

> Joshua Hahn <joshua.hahnjy@xxxxxxxxx> writes:
> 
> > On Mon, 12 May 2025 09:35:16 +0800 "Huang, Ying" <ying.huang@xxxxxxxxxxxxxxxxx> wrote:
> >
> >> Hi, Joshua,
> >> 
> >> Joshua Hahn <joshua.hahnjy@xxxxxxxxx> 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@xxxxxxxxxxxxxxxxx>

Thank you Ying, really appreciate all of your feedback throughout this
series. I hope you have a great day!
Joshua

> 
> ---
> Best Regards,
> Huang, Ying




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux