Re: [PATCH v2 2/2] mm: implement page refcount locking via dedicated bit

From: Linus Torvalds

Date: Thu Apr 23 2026 - 14:32:18 EST


On Thu, 23 Apr 2026 at 11:25, Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:
>
> 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@xxxxxxxxxxxxx/

I htink the impetus for this was partly that, see the original cover letter at

https://lore.kernel.org/all/cover.1766145604.git.gladyshev.ilya1@xxxxxxxxxxxxxx/

quoting:

>> This patch optimizes small file read performance and overall folio refcount
>> scalability by refactoring page_ref_add_unless [core of folio_try_get].
>> This is alternative approach to previous attempts to fix small read
>> performance by avoiding refcount bumps [1][2].

where that [2] is that link to Kirill's patch.

Linus