All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Huang, Ying" <ying.huang@linux.alibaba.com>
To: Joshua Hahn <joshua.hahnjy@gmail.com>
Cc: Gregory Price <gourry@gourry.net>,
	 Andrew Morton <akpm@linux-foundation.org>,
	 Jackie Liu <liu.yun@linux.dev>,
	 David Hildenbrand <david@kernel.org>,  Zi Yan <ziy@nvidia.com>,
	 Matthew Brost <matthew.brost@intel.com>,
	 Rakie Kim <rakie.kim@sk.com>,  Byungchul Park <byungchul@sk.com>,
	 Alistair Popple <apopple@nvidia.com>,
	linux-mm@kvack.org,  linux-kernel@vger.kernel.org,
	 kernel-team@meta.com
Subject: Re: [PATCH] mm/mempolicy: Fix weighted interleave auto sysfs name
Date: Thu, 09 Apr 2026 15:05:54 +0800	[thread overview]
Message-ID: <87bjfsy5nx.fsf@DESKTOP-5N7EMDA> (raw)
In-Reply-To: <20260407172350.699577-1-joshua.hahnjy@gmail.com> (Joshua Hahn's message of "Tue, 7 Apr 2026 10:23:50 -0700")

Joshua Hahn <joshua.hahnjy@gmail.com> writes:

> On Tue, 7 Apr 2026 13:09:04 -0400 Gregory Price <gourry@gourry.net> wrote:
>
>> On Tue, Apr 07, 2026 at 07:14:14AM -0700, Joshua Hahn wrote:
>> > The __ATTR macro is a utility that makes defining kobj_attributes easier
>> > by stringfying the name, verifying the mode, and setting the show/store
>> > fields in a single initializer. It takes a raw token as the first value,
>> > rather than a string, so that __ATTR family macros like __ATTR_RW can
>> > token-paste it for inferring the _show / _store function names.
>> > 
>> > Commit e341f9c3c841 ("mm/mempolicy: Weighted Interleave Auto-tuning")
>> > used the __ATTR macro to define the "auto" sysfs for weighted
>> > interleave. A few months later, commit 2fb6915fa22d ("compiler_types.h:
>> > add "auto" as a macro for "__auto_type"") introduced a #define macro
>> > which expanded auto into __auto_type.
>> > 
>> 
>
> Hello Gregory, thanks for reviewing my patch!!
>
>> Well that's really unfortunately.
>> 
>> Is this really the only "auto" in the entire sysfs structure?
>
> Thankfully, it seems so:
>
> $ rg "__ATTR\(auto"
>
> mm/mempolicy.c
> 3786:   __ATTR(auto, 0664, weighted_interleave_auto_show,
>
> arch/powerpc/platforms/pseries/power.c
> 44:     __ATTR(auto_poweron, 0644, auto_poweron_show, auto_poweron_store);
>
> Although maybe it is more valuable to check any __ATTR family macro
> for a macro as the first parameter.  In hindsight, I should have been more
> wary of passing a keyword as a token.
>
> [...snip...]
>
>> > Signed-off-by: Joshua Hahn <joshua.hahnjy@gmail.com>
>> 
>> Maybe - 
>> 
>> Fixes: 2fb6915fa22d ("compiler_types.h: add "auto" as a macro for "__auto_type"")
>
> I thought about adding a Fixes tag, decided against it because it's
> purely cosmetic.
>
> ... but now that I think about it, I think this could break some workflows
> for users who have automated writing to the auto sysfs file.

Fixes tag helps people to decide whether to backport the commit.  So, I
think that we need it anyway.  Feel free to add

Acked-by: Huang Ying <ying.huang@linux.alibaba.com>

in the future versions.

[snip]

---
Best Regards,
Huang, Ying


  parent reply	other threads:[~2026-04-09  7:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-07 14:14 [PATCH] mm/mempolicy: Fix weighted interleave auto sysfs name Joshua Hahn
2026-04-07 17:09 ` Gregory Price
2026-04-07 17:23   ` Joshua Hahn
2026-04-07 17:33     ` Gregory Price
2026-04-09  7:05     ` Huang, Ying [this message]
2026-04-08  4:56 ` Rakie Kim
2026-04-08  8:04 ` David Hildenbrand (Arm)
2026-04-08 18:05 ` Zi Yan

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=87bjfsy5nx.fsf@DESKTOP-5N7EMDA \
    --to=ying.huang@linux.alibaba.com \
    --cc=akpm@linux-foundation.org \
    --cc=apopple@nvidia.com \
    --cc=byungchul@sk.com \
    --cc=david@kernel.org \
    --cc=gourry@gourry.net \
    --cc=joshua.hahnjy@gmail.com \
    --cc=kernel-team@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=liu.yun@linux.dev \
    --cc=matthew.brost@intel.com \
    --cc=rakie.kim@sk.com \
    --cc=ziy@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.