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