From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oa1-f41.google.com (mail-oa1-f41.google.com [209.85.160.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2F6AB33ADB5 for ; Tue, 7 Apr 2026 17:23:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775582636; cv=none; b=uGgISI7rE7YJNUXseXEvEO23eA3pyUSXxi5Tl+0ywPhYLTIZmFLYoMLnDMHZ/Y9K012l3M+IEFnKTS5KuyKiuo7p4KMKJSur9wbR3Gv5jZfnhYRG9VsKCDYOKeWJhWyn3OEKGvJwJf8QXgX2gJEeOjKkJB9cKyc4+O+Ro4Nx92Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775582636; c=relaxed/simple; bh=tCZp4wmMRTqYYPhKDaCfJBLzY05BxtfIwcTfkfYTIpY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=J19Yv8X4XelXNRoyLbumrb8WX8k95UyVboiMfPd43vTqaFqwcopYTDVOVcXJ9jzttIbRbRuZG6cVOo/pr0yVBnj8tHZXm8cF3DFq0YSU9+rfJwURYvZz30ZGODLEdj9jTqsMMBbqw514ZZDJ4kyU+nYex7EQpH5blKyKOrbjTrg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=GXMh88QC; arc=none smtp.client-ip=209.85.160.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GXMh88QC" Received: by mail-oa1-f41.google.com with SMTP id 586e51a60fabf-4094b31a037so3763563fac.1 for ; Tue, 07 Apr 2026 10:23:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775582634; x=1776187434; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UmV1J/GHikC7tT+phj84rdE9QRa2smYTRcGDKTZxJqE=; b=GXMh88QCCYsRfjQHFnYDOdGNP6cKWKZydFJQpvfxzAIIe/yyIAWsrPE90Wj2WhS4dS s69cpCFBo76oEeoiXeAaBWxiCcU0F68mmLHDdsjF0tzHunrkTsH1OAafHimNFN3SZFm7 fHzfIJvH0tAGrDrpzaChaWnGNKzPCOG1JcEPOTvOT85TOB8IpZRx6pMB4Gou9niEeghj 6I7sUesQXaqZUi0J4WZixLuVkHcKR9XwHc7BWPX/iufy8aTHZWRBf0A7HOV6bJllw8ua faPJ5toJ7RaO2Fy5KpO1vBvsVWwwip6LBuU87mYXGrdgKi0zNqGaLjzEp4/QJ+bqMgUf ZADA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775582634; x=1776187434; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=UmV1J/GHikC7tT+phj84rdE9QRa2smYTRcGDKTZxJqE=; b=Fr4WqceeomCkXnyR4/B174BL/kLcCrWjMyc+iYv+gR6HIF+iGk1Wa1JhesLxm7zFb4 /Qs066oN1oFD6BHg9bL9PL1PxsK5j+gmnYiM9c7IUb2Bf+X0aIM5BusTp+NMFHqoDh7/ iuUKV1XseJqY8finn8Za0VnhWpvrN+KrSaXZ+aZFi/1Xxt54ZDt9QWg2m9WJZV+YXHX0 CAJ6sy68c6GT96cNPpJvhPNymTH7inW1HSrlhQ2Dmoe9YEzuraOwLfA3I0QaWjmDHIrY H9dlT805QfOWWp7MFTOW2ncEQM4wBb9/6tPVwkuvdObAgPtsTl9IlvUcpfg/FZNn92ff 2/fg== X-Forwarded-Encrypted: i=1; AJvYcCWAG01XItPe2cVTyP+PJnA38Uu6bEAv0c/ocrMw6vDk1HSYC1Kp4CSjOzGGuZ5+bZFpLsulaj17mjwkKFQ=@vger.kernel.org X-Gm-Message-State: AOJu0YyCLDrtZQCsa4pctUIyXjil7XNc+z1myZGoVLs3alMNzZClSInw zNoSwg8FAamwwKyctDtJhNGa/LRSVfRgrMs1U+SWPMYZtkXi1T9t1P+2 X-Gm-Gg: AeBDiespg/fX3V6/iUY0eTkcDPiR/l6/qKzuX65lEITdOPwIKGYHMTy0nMq7pL9sUuw 0rOBoKGWH/SCgvkxbNSIw2tdUDRzx+YDzHU4b7xkjoBnH/QsZ004YSdeW055dEmOMly2wsxqUvU OilLh2wkhjZ9QbGfbLA5Zx8r+NCfkxffDCbMxHxh8lNKh+VZ06vv+N+B0ofJ+clOhoMVFQENdaF RQqrYnLdVF7kRYc9XL03XGn4a+34kTkvN+3etMrje5/eFmTsDVRd/e8AL3w4o98BsdzH9LFbayN x/gC8xJymRgIaYetYEgqiXnneVsPmPPXZ+vaefqQXgJbRdjza57wxoxw5s3Y0UPxfQg7aFeq3g3 ga6LbkxooaDQ06CkDrkmG2GOIKNKOb6KDCpH6n05lvT98kzx/gr4n04rjZgi9/hYpksdZ9MPA69 pDocMGPixUlKIDPGyUKQNI8xnJKW7eDbmS X-Received: by 2002:a05:6870:9e8b:b0:422:e938:6b49 with SMTP id 586e51a60fabf-4231009bc3dmr10342207fac.38.1775582634032; Tue, 07 Apr 2026 10:23:54 -0700 (PDT) Received: from localhost ([2a03:2880:10ff:5c::]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-4235e32d9dfsm5891881fac.16.2026.04.07.10.23.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Apr 2026 10:23:53 -0700 (PDT) From: Joshua Hahn To: Gregory Price Cc: Andrew Morton , Jackie Liu , David Hildenbrand , Zi Yan , Matthew Brost , Rakie Kim , Byungchul Park , Ying Huang , 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 Date: Tue, 7 Apr 2026 10:23:50 -0700 Message-ID: <20260407172350.699577-1-joshua.hahnjy@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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. Maybe I should add a fixes tag for the patch that introduced the sysfs file instead? That is, Fixes: e341f9c3c841 ("mm/mempolicy: Weighted Interleave Auto-tuning") > Reviewed-by: Gregory Price Thanks again, Gregory!! I hope you have a great day : -) Joshua