AIO *is* useful in driver APIs
AIO *is* useful in driver APIs
Posted Dec 13, 2003 21:00 UTC (Sat) by HalfMoon (guest, #3211)Parent article: Driver porting: supporting asynchronous I/O
For most char drivers, there is little benefit to be gained from AIO support. In a few rare cases, however, it may be beneficial to make AIO available to your users.
Not so rare as that. In fact, the first time I happened across AIO was in some other OS, where it was used to help provide drivers (a) access to I/O overlap with CPU processing, (b) user-mode control over readahead or writebehind buffering policies and (c) better accomodation for guaranteed-latency ("realtime") processing. Lots of UNIX APIs are basically just special case workarounds for not having AIO ... but they're more complicated to implement. Why not use the real thing, now that it's finally available? And for that matter, new code might be able to implement only AIO and thereby simplify quite a lot of things.
It's true that most of the 2.6 kernel AIO code is involved with improving disk concurrency, but classically that's only one of the problem domains for AIO. Linux can catch up with other operating systems in that respect pretty easily.
One more thing... the "retry" mechanism in AIO is something you'll probably have to use. It's still getting changed around a bit though.
