|LWN.net needs you!|
Without subscribers, LWN would simply not exist. Please consider signing up for a subscription and helping to keep LWN publishing
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. ]
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