Re: XFS doesn't correctly account for IO-Wait for directory reading

Christoph Hellwig
2008-01-23T12:17:38Z

Try this one-liner patch which should give you much better I/O wait
reporting. There's some more I/O waits hidden in the log code, but to
fix this we'd need to dig into the sv_t abstraction. Given that it only
has four users left I'm probably going to simply remove it and fix the
I/O wait accounting while I'm at it.

--- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_buf.c 2008-01-23 13:08:48.000000000 +0100
+++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_buf.c 2008-01-23 13:08:54.000000000 +0100
@@ -976,7 +976,7 @@ xfs_buf_wait_unpin(
break;
if (atomic_read(&bp->b_io_remaining))
blk_run_address_space(bp->b_target->bt_mapping);
- schedule();
+ io_schedule();
}
remove_wait_queue(&bp->b_waiters, &wait);
set_current_state(TASK_RUNNING);