lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aYX96BcEn0EPiUlH@thinkstation>
Date: Fri, 6 Feb 2026 14:43:10 +0000
From: Kiryl Shutsemau <kirill@...temov.name>
To: Gladyshev Ilya <gladyshev.ilya1@...artners.com>
Cc: gorbunov.ivan@...artners.com, artem.kuzin@...wei.com, 
	stepanov.anatoly@...wei.com, alexander.grubnikov@...wei.com, 
	David Hildenbrand <david@...nel.org>, Andrew Morton <akpm@...ux-foundation.org>, 
	Lorenzo Stoakes <lorenzo.stoakes@...cle.com>, "Liam R. Howlett" <Liam.Howlett@...cle.com>, 
	Vlastimil Babka <vbabka@...e.cz>, Mike Rapoport <rppt@...nel.org>, 
	Suren Baghdasaryan <surenb@...gle.com>, Michal Hocko <mhocko@...e.com>, Zi Yan <ziy@...dia.com>, 
	Harry Yoo <harry.yoo@...cle.com>, "Matthew Wilcox (Oracle)" <willy@...radead.org>, 
	Yu Zhao <yuzhao@...gle.com>, Baolin Wang <baolin.wang@...ux.alibaba.com>, 
	Will Deacon <will@...nel.org>, linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: make ref_unless functions unless_zero only

On Fri, Feb 06, 2026 at 01:33:02PM +0000, 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>
> Acked-by: David Hildenbrand (Arm) <david@...nel.org>

Acked-by: Kiryl Shutsemau <kas@...nel.org>

-- 
  Kiryl Shutsemau / Kirill A. Shutemov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ