From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-112.freemail.mail.aliyun.com (out30-112.freemail.mail.aliyun.com [115.124.30.112]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CB3B522D781 for ; Thu, 9 Apr 2026 07:06:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.112 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775718371; cv=none; b=t9o7/FspZGtre0ou0uTeGRuKKRtCXiVUrcIBYL3P8Y9sz8r7vFOTfRpgF1ArtoTXNyTxqrInFuQzP1U2forCy/RmQQ6k/jUPJVywoaP8ztRHTSnILNopa7HKSqCEQfnOAVjIqdMy8O9xbMGQjwQkFK4U1AlYxiMVO1bq8cWE45Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775718371; c=relaxed/simple; bh=EidC3QaiA1q0/m9Pik06DfKlsrnLAr4BrW0T4++WZ/I=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=eOXZGMFxhiSq8GFmwuamByxECZY0aVNdF0iexJOmvUFkbSXjV/AUt69UpHuh6L5IE2UaivGKuuAl4v1/873MqNLRCegJ58yw2bwKv+F/8jHBPzRx4pTXdowgMNpANY7ozJJeTi4FpZI0bTG4k4xbN1TY+Le5Rv+1xE/qe1mLueM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=SufnQSeT; arc=none smtp.client-ip=115.124.30.112 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="SufnQSeT" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1775718359; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; bh=Av5kApTuVKQ2ovOm1Q+K88vhXOOjtCZxC4N23qscKWQ=; b=SufnQSeTtFme3qNNXrZsR/LdR8FNXLRfz3doncLv4gXOIseDv6o6slxdpJUld3WlO43AVe5y3WibOZ69gl9C6gYT1nO7YkLueO+ZK7xISTNxa0TTpRnj53vDXFPdqEm6rk61tKuwB7EH9/KvPNrnqFNtkCMaxfbI7Ep5aZ66+1A= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R151e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033032089153;MF=ying.huang@linux.alibaba.com;NM=1;PH=DS;RN=13;SR=0;TI=SMTPD_---0X0hYF7w_1775718356; Received: from DESKTOP-5N7EMDA(mailfrom:ying.huang@linux.alibaba.com fp:SMTPD_---0X0hYF7w_1775718356 cluster:ay36) by smtp.aliyun-inc.com; Thu, 09 Apr 2026 15:05:57 +0800 From: "Huang, Ying" To: Joshua Hahn Cc: Gregory Price , Andrew Morton , Jackie Liu , David Hildenbrand , Zi Yan , Matthew Brost , Rakie Kim , Byungchul Park , Alistair Popple , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@meta.com Subject: Re: [PATCH] mm/mempolicy: Fix weighted interleave auto sysfs name In-Reply-To: <20260407172350.699577-1-joshua.hahnjy@gmail.com> (Joshua Hahn's message of "Tue, 7 Apr 2026 10:23:50 -0700") References: <20260407172350.699577-1-joshua.hahnjy@gmail.com> Date: Thu, 09 Apr 2026 15:05:54 +0800 Message-ID: <87bjfsy5nx.fsf@DESKTOP-5N7EMDA> User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ascii Joshua Hahn writes: > On Tue, 7 Apr 2026 13:09:04 -0400 Gregory Price 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 >> >> 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 in the future versions. [snip] --- Best Regards, Huang, Ying