Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 5577022f authored by Vladimir Davydov's avatar Vladimir Davydov Committed by Jens Axboe
Browse files

block: account iowait time when waiting for completion of IO request


Using wait_for_completion() for waiting for a IO request to be executed
results in wrong iowait time accounting. For example, a system having
the only task doing write() and fdatasync() on a block device can be
reported being idle instead of iowaiting as it should because
blkdev_issue_flush() calls wait_for_completion() which in turn calls
schedule() that does not increment the iowait proc counter and thus does
not turn on iowait time accounting.

The patch makes block layer use wait_for_completion_io() instead of
wait_for_completion() where appropriate to account iowait time
correctly.

Signed-off-by: default avatarVladimir Davydov <vdavydov@parallels.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 686855f5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment