User: Password:
|
|
Subscribe / Log in / New account

Direct I/O status

LWN.net needs you!

Without subscribers, LWN would simply not exist. Please consider signing up for a subscription and helping to keep LWN publishing

By Jake Edge
April 2, 2014
2014 LSFMM Summit

Kent Overstreet spoke about his rewrite of the direct I/O (DIO) code in a session at this year's Linux Storage, Filesystem, and Memory Management (LSFMM) Summit. Direct I/O accesses the underlying device directly and avoids data being stored in the page cache.

Overstreet began by noting that the immutable biovec work was now upstream. That allows for more easily splitting a struct bio. The only remaining prerequisite for the DIO rewrite is a generic make_request() that can take arbitrarily sized bios. Once that's there, drivers will need to do the splitting.

So, the kernel can implement a DIO operation by allocating a bio and putting a "bunch of pages into it". It reduces the code size and complexity significantly. A lot of the work currently done to manipulate arrays of pages just goes away. The end goal should be that dio should just be able to hand a bio to a filesystem and let it do the lookups, he said. In addition, hopefully the lower layers of the buffered I/O code can use the generic make_request() changes as well. Splitting a bio is now no less efficient that allocating two to begin with.

[ Thanks to the Linux Foundation for travel support to attend LSFMM. ]


(Log in to post comments)

Direct I/O status

Posted Apr 3, 2014 12:23 UTC (Thu) by jlayton (subscriber, #31672) [Link]

The problem with sending down bios is that it totally ignores the needs of non-block-based filesystems (e.g. NFS, CIFS, etc...)

bios are currently limited to something like 256 pages, so we can't reasonably support any rsize/wsize that's larger if we use that as the base structure for handling direct I/O. That's a pretty serious regression for NFS which can handle much larger sizes.

At the summit, Al Viro mentioned that what he really ought to aim for is basing this around the iov_iter structure. There could then be a common helper that splits that into bios and then passes those down to a fs-specific handler for block-based fs'.


Copyright © 2014, Eklektix, Inc.
This article may be redistributed under the terms of the Creative Commons CC BY-SA 4.0 license
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds