From: Andrew Morton <akpm@linux-foundation.org>
To: Aubrey Li <aubrey.li@linux.intel.com>
Cc: Jan Kara <jack@suse.cz>, Matthew Wilcox <willy@infradead.org>,
Nanhai Zou <nanhai.zou@intel.com>,
Gang Deng <gang.deng@intel.com>,
Tianyou Li <tianyou.li@intel.com>,
Vinicius Gomes <vinicius.gomes@intel.com>,
Tim Chen <tim.c.chen@linux.intel.com>,
Chen Yu <yu.c.chen@intel.com>,
linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
Roman Gushchin <roman.gushchin@linux.dev>
Subject: Re: [PATCH] mm/readahead: Skip fully overlapped range
Date: Sat, 11 Oct 2025 15:20:42 -0700 [thread overview]
Message-ID: <20251011152042.d0061f174dd934711bc1418b@linux-foundation.org> (raw)
In-Reply-To: <6bcf9dfe-c231-43aa-8b1c-f699330e143c@linux.intel.com>
On Tue, 30 Sep 2025 13:35:43 +0800 Aubrey Li <aubrey.li@linux.intel.com> wrote:
> file_ra_state is considered a performance hint, not a critical correctness
> field. The race conditions on file's readahead state don't affect the
> correctness of file I/O because later the page cache mechanisms ensure data
> consistency, it won't cause wrong data to be read. I think that's why we do
> not lock file_ra_state today, to avoid performance penalties on this hot path.
>
> That said, this patch didn't make things worse, and it does take a risk but
> brings the rewards of RocksDB's readseq benchmark.
So if I may summarize:
- you've identifed and addressed an issue with concurrent readahead
against an fd
- Jan points out that we don't properly handle concurrent access to a
file's ra_state. This is somewhat offtopic, but we should address
this sometime anyway. Then we can address the RocksDB issue later.
Alternatively, we could fix this issue right now and let the
concurrency fixes come later. Not as pretty, but it's practical.
Another practicality: improving a benchmark is nice, but do we have any
reasons to believe that this change will improve any real-world
workload? If so, which and by how much?
next prev parent reply other threads:[~2025-10-11 22:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-23 3:59 Aubrey Li
2025-09-23 3:49 ` Andrew Morton
2025-09-23 5:11 ` Aubrey Li
2025-09-23 9:57 ` Jan Kara
2025-09-24 0:27 ` Aubrey Li
2025-09-30 5:35 ` Aubrey Li
2025-10-11 22:20 ` Andrew Morton [this message]
2025-10-16 16:21 ` Jan Kara
2025-11-07 10:28 ` Aubrey Li
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=20251011152042.d0061f174dd934711bc1418b@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=aubrey.li@linux.intel.com \
--cc=gang.deng@intel.com \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nanhai.zou@intel.com \
--cc=roman.gushchin@linux.dev \
--cc=tianyou.li@intel.com \
--cc=tim.c.chen@linux.intel.com \
--cc=vinicius.gomes@intel.com \
--cc=willy@infradead.org \
--cc=yu.c.chen@intel.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