Bug 253337 - AIO not shown by iostat, top, etc.
Summary: AIO not shown by iostat, top, etc.
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel   
(Show other bugs)
Version: 5.0
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: Jeff Moyer
QA Contact: Martin Jenner
Depends On:
Blocks: 425461
TreeView+ depends on / blocked
Reported: 2007-08-17 22:12 UTC by Jeff Moyer
Modified: 2008-05-21 14:52 UTC (History)
0 users

Fixed In Version: RHBA-2008-0314
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-05-21 14:52:31 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
use io_schedule in the AIO code (879 bytes, patch)
2007-08-17 22:23 UTC, Jeff Moyer
no flags Details | Diff
Only account io_wait time if waiting for events (474 bytes, patch)
2007-12-18 18:17 UTC, Jeff Moyer
no flags Details | Diff

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2008:0314 normal SHIPPED_LIVE Updated kernel packages for Red Hat Enterprise Linux 5.2 2008-05-20 18:43:34 UTC

Description Jeff Moyer 2007-08-17 22:12:48 UTC
+++ 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@redhat.com 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.

Comment 1 Jeff Moyer 2007-08-17 22:23:40 UTC
Created attachment 161774 [details]
use io_schedule in the AIO code

Comment 2 RHEL Product and Program Management 2007-08-17 22:26:01 UTC
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

Comment 4 Don Zickus 2007-11-29 17:04:56 UTC
in 2.6.18-58.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5

Comment 5 Jeff Moyer 2007-12-18 18:17:07 UTC
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:

Comment 7 Don Zickus 2008-01-10 20:42:25 UTC
in 2.6.18-66.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5

Comment 10 errata-xmlrpc 2008-05-21 14:52:31 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.