[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2c984546-3e26-40e0-b9d8-68383555ced2@kernel.org>
Date: Fri, 6 Feb 2026 14:16:58 +0100
From: "David Hildenbrand (Arm)" <david@...nel.org>
To: Gladyshev Ilya <gladyshev.ilya1@...artners.com>, patchwork@...wei.com
Cc: guohanjun@...wei.com, wangkefeng.wang@...wei.com, weiyongjun1@...wei.com,
yusongping@...wei.com, leijitang@...wei.com, artem.kuzin@...wei.com,
stepanov.anatoly@...wei.com, alexander.grubnikov@...wei.com,
gorbunov.ivan@...artners.com, akpm@...ux-foundation.org,
lorenzo.stoakes@...cle.com, Liam.Howlett@...cle.com, vbabka@...e.cz,
rppt@...nel.org, surenb@...gle.com, mhocko@...e.com, ziy@...dia.com,
harry.yoo@...cle.com, willy@...radead.org, yuzhao@...gle.com,
baolin.wang@...ux.alibaba.com, muchun.song@...ux.dev, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 1/2] mm: make ref_unless functions unless_zero only
On 12/19/25 13:46, Gladyshev Ilya wrote:
> There are no users of (folio/page)_ref_add_unless(page, nr, u) with
> u != 0 [1] and all current users are "internal" for page refcounting API.
> This allows us to safely drop this parameter and reduce function
> semantics to the "unless zero" cases only, which will be optimized in
> the following patch.
>
> If needed, these functions for the u!=0 cases can be trivially
> reintroduced later using the same atomic_add_unless operations as before.
>
> [1]: The last user was dropped in v5.18 kernel, commit 27674ef6c73f
> ("mm: remove the extra ZONE_DEVICE struct page refcount"). There is no
> trace of discussion as to why this cleanup wasn't done earlier.
>
> Co-developed-by: Gorbunov Ivan <gorbunov.ivan@...artners.com>
> Signed-off-by: Gorbunov Ivan <gorbunov.ivan@...artners.com>
> Signed-off-by: Gladyshev Ilya <gladyshev.ilya1@...artners.com>
> ---
This one makes a lot of sense even without #2. Can you send that out
early as a standalone patch?
Acked-by: David Hildenbrand (Arm) <david@...nel.org>
--
Cheers,
David
Powered by blists - more mailing lists