From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Matthew Wilcox <willy@infradead.org>,
Gorbunov Ivan <gorbunov.ivan@h-partners.com>
Cc: Liam.Howlett@oracle.com, akpm@linux-foundation.org,
apopple@nvidia.com, baolin.wang@linux.alibaba.com,
gladyshev.ilya1@h-partners.com, harry.yoo@oracle.com,
kirill@shutemov.name, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, lorenzo.stoakes@oracle.com, mhocko@suse.com,
muchun.song@linux.dev, rppt@kernel.org, surenb@google.com,
torvalds@linuxfoundation.org, vbabka@suse.cz, yuzhao@google.com,
ziy@nvidia.com, artem.kuzin@huawei.com
Subject: Re: [PATCH v2 2/2] mm: implement page refcount locking via dedicated bit
Date: Thu, 23 Apr 2026 21:20:04 +0200 [thread overview]
Message-ID: <12346cd9-25c7-4907-9be4-1bd3f56719e3@kernel.org> (raw)
In-Reply-To: <aepj9_v_1dYJ_tRu@casper.infradead.org>
On 4/23/26 20:24, Matthew Wilcox wrote:
> On Mon, Apr 20, 2026 at 08:01:19AM +0000, Gorbunov Ivan wrote:
>> The current atomic-based page refcount implementation treats zero
>> counter as dead and requires a compare-and-swap loop in folio_try_get()
>> to prevent incrementing a dead refcount. This CAS loop acts as a
>> serialization point and can become a significant bottleneck during
>> high-frequency file read operations.
>
> If the file read is high-frequency, then for the page refcount to be
> the bottleneck, they must be small reads? Have you looked at this
> patch?
>
> https://lore.kernel.org/all/20251017141536.577466-1-kirill@shutemov.name/
I hate that with passion. It reminds me of load_unaligned_zeropad(). Which I
hate with passion.
(somewhere on my todo list is investigating hot to get rid of that whole
load_unaligned_zeropad machinery)
--
Cheers,
David
next prev parent reply other threads:[~2026-04-23 19:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-20 8:01 [PATCH v2 0/2] mm: improve folio refcount scalability Gorbunov Ivan
2026-04-20 8:01 ` [PATCH v2 1/2] mm: drop page refcount zero state semantics Gorbunov Ivan
2026-04-23 18:07 ` Bjorn Helgaas
2026-04-23 19:32 ` Zi Yan
2026-04-20 8:01 ` [PATCH v2 2/2] mm: implement page refcount locking via dedicated bit Gorbunov Ivan
2026-04-23 18:24 ` Matthew Wilcox
2026-04-23 18:31 ` Linus Torvalds
2026-04-23 19:20 ` David Hildenbrand (Arm) [this message]
2026-04-23 19:37 ` Zi Yan
2026-04-20 10:07 ` [syzbot ci] Re: mm: improve folio refcount scalability syzbot ci
2026-04-20 12:29 ` Gorbunov Ivan
2026-04-20 13:21 ` syzbot ci
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=12346cd9-25c7-4907-9be4-1bd3f56719e3@kernel.org \
--to=david@kernel.org \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=apopple@nvidia.com \
--cc=artem.kuzin@huawei.com \
--cc=baolin.wang@linux.alibaba.com \
--cc=gladyshev.ilya1@h-partners.com \
--cc=gorbunov.ivan@h-partners.com \
--cc=harry.yoo@oracle.com \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mhocko@suse.com \
--cc=muchun.song@linux.dev \
--cc=rppt@kernel.org \
--cc=surenb@google.com \
--cc=torvalds@linuxfoundation.org \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
--cc=yuzhao@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox