From: Kiryl Shutsemau <kirill@shutemov.name>
To: Mingyu He <mingyu.he@shopee.com>
Cc: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org,
hannes@cmpxchg.org, clm@meta.com, linux-kernel@vger.kernel.org,
willy@infradead.org, bfoster@redhat.com,
Jens Axboe <axboe@kernel.dk>,
littleswimmingwhale@gmail.com
Subject: Re: [ISSUE] Read performance regression when using RWF_DONTCACHE form 8026e49 "mm/filemap: add read support for RWF_DONTCACHE"
Date: Wed, 15 Apr 2026 11:05:21 +0100 [thread overview]
Message-ID: <ad9g22IbYJatwptY@thinkstation> (raw)
In-Reply-To: <CAAoBcuSK38z5Nh7rGuHDFwpNvtc0W49OZKc1_d1QkCbK_nL7Ew@mail.gmail.com>
On Wed, Apr 15, 2026 at 03:28:27PM +0800, Mingyu He wrote:
> The smaller the buffer_size in the test program, the more the
> performance dropped. Initially, I used a 4k buffer_size, and the
> performance decreased significantly. When the buffer_size was
> increased to 128K, the read performance with RWF_DONTCACHE actually
> surpassed the non-flagged version by about 10%.
Maybe you have block size larger than 4k? Core-mm will allocate larger
folios for page cache if filesystem asks it to. And if you try to access
it with 4k buffer it gets multiple read-discard cycles for the same
block with RWF_DONTCACHE. Without RWF_DONTCACHE only the first access to
the block will lead to I/O, following accesses are served from page
cache.
--
Kiryl Shutsemau / Kirill A. Shutemov
next prev parent reply other threads:[~2026-04-15 10:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-15 7:28 Mingyu He
2026-04-15 10:05 ` Kiryl Shutsemau [this message]
2026-04-15 11:04 ` Mingyu He
2026-04-15 13:49 ` Matthew Wilcox
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=ad9g22IbYJatwptY@thinkstation \
--to=kirill@shutemov.name \
--cc=axboe@kernel.dk \
--cc=bfoster@redhat.com \
--cc=clm@meta.com \
--cc=hannes@cmpxchg.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=littleswimmingwhale@gmail.com \
--cc=mingyu.he@shopee.com \
--cc=willy@infradead.org \
/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