From: Jens Axboe <axboe@kernel.dk>
To: Christoph Hellwig <hch@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Dave Chinner <david@fromorbit.com>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
Linux Memory Management List <linux-mm@kvack.org>,
Chris Mason <clm@fb.com>, Pavel Begunkov <asml.silence@gmail.com>
Subject: Re: mm: don't read i_size of inode unless we need it
Date: Thu, 28 Oct 2021 09:00:32 -0600 [thread overview]
Message-ID: <d8118299-6576-fae6-e02c-8ae1e25c5d68@kernel.dk> (raw)
In-Reply-To: <YXqxXXDYtKetgZY0@infradead.org>
On 10/28/21 8:19 AM, Christoph Hellwig wrote:
> Btw, given that you're micro-optimizing in this area:
>
> block devices still use ->direct_IO in the I/O path. It might make
> sense to switch to the model of the file systems that use iomap where
> we avoid that indirect call and can optimize the code for the direct
> I/O fast path. With that you woudn't even end up using this i_size_read
> at all
It's not a bad idea, we do kind of jump through some hoops here by
calling generic_file_iter_read(), we should just check for dio upfront
and handle that, falling back to filemap_read() if needed.
--
Jens Axboe
prev parent reply other threads:[~2021-10-28 15:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-26 18:15 Jens Axboe
2021-10-26 19:11 ` Chris Mason
2021-10-27 15:50 ` Jens Axboe
2021-10-28 14:19 ` Christoph Hellwig
2021-10-28 15:00 ` Jens Axboe [this message]
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=d8118299-6576-fae6-e02c-8ae1e25c5d68@kernel.dk \
--to=axboe@kernel.dk \
--cc=akpm@linux-foundation.org \
--cc=asml.silence@gmail.com \
--cc=clm@fb.com \
--cc=david@fromorbit.com \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.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