GFS2: Wait properly when flushing the ail list
authorSteven Whitehouse <swhiteho@redhat.com>
Sat, 21 May 2011 18:21:07 +0000 (19:21 +0100)
committerSteven Whitehouse <swhiteho@redhat.com>
Sat, 21 May 2011 18:21:07 +0000 (19:21 +0100)
The ail flush code has always relied upon log flushing to prevent
it from spinning needlessly. This fixes it to wait on the last
I/O request submitted (we don't need to wait for all of it)
instead of either spinning with io_schedule or sleeping.

As a result cpu usage of gfs2_logd is much reduced with certain
workloads.

Reported-by: Abhijith Das <adas@redhat.com>
Tested-by: Abhijith Das <adas@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>

No differences found