+++ This bug was initially created as a clone of Bug #220902 +++ Summary: AIO calls in the kernel do not get registered by iostat, top and similar programs as contributing to iowait. Details: When the aio kernel module reads or writes, it doesn't schedule the I/O in a way that gets recognized by our sysstat programs. That leads to a situation where inaccurate outputs of iowait. The customer's onsite GPS consultant observed this behavior and proposed the aio.patch file that's attached to this IT ticket. It was submitted to rhkernel-list and lkml where it was rejected by lkml. -- Additional comment from jmoyer on 2007-08-17 12:25 EST -- Created an attachment (id=161753) Account for io_wait time properly when using AIO In theory, not all AIO operations actually initiate disk I/O. The only AIO command that does not issue disk I/O is IOCB_CMD_NOOP which, as it happens, actually isn't usable as implemented! If IOCB_CMD_NOOP were usable, the attached patch would be the right way to account for I/O wait time appropriately. It creates a hash table of io contexts and associated I/O counters. Whenever a process schedules, this code checks to see if there is real I/O pending, and calls io_schedule if so. Otherwise, it uses schedule() as before. Given that IOCB_CMD_NOOP doesn't actually work, the real solution is to just call io_schedule unconditionally. That patch is much simpler, and I'll attach it after discussing this with upstream. I'm posting this patch in case we ever wanted to correctly implement the IOCB_CMD_NOOP command.
Created attachment 161774 [details] use io_schedule in the AIO code
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
in 2.6.18-58.el5 You can download this test kernel from http://people.redhat.com/dzickus/el5
Created attachment 289911 [details] Only account io_wait time if waiting for events This patch needs to be applied in addition to the previous one. Upstream discussion here: http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg236279.html
in 2.6.18-66.el5 You can download this test kernel from http://people.redhat.com/dzickus/el5
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2008-0314.html