Bug 253337 - AIO not shown by iostat, top, etc.
AIO not shown by iostat, top, etc.
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
5.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeffrey Moyer
Martin Jenner
:
Depends On:
Blocks: 425461
  Show dependency treegraph
 
Reported: 2007-08-17 18:12 EDT by Jeffrey Moyer
Modified: 2008-05-21 10:52 EDT (History)
0 users

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


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

  None (edit)
Description Jeffrey Moyer 2007-08-17 18:12:48 EDT
+++ 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 Jeffrey Moyer 2007-08-17 18:23:40 EDT
Created attachment 161774 [details]
use io_schedule in the AIO code
Comment 2 RHEL Product and Program Management 2007-08-17 18:26:01 EDT
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.
Comment 4 Don Zickus 2007-11-29 12:04:56 EST
in 2.6.18-58.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5
Comment 5 Jeffrey Moyer 2007-12-18 13:17:07 EST
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
Comment 7 Don Zickus 2008-01-10 15:42:25 EST
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 10:52:31 EDT
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

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