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)
commit26b06a6958df0f12f1a654db8598433eb89cc024
tree4f65fc66e5bef81d7ef16f620686a048c49c7196
parent6d3117b41295150d4ac70622055dd8f5529d86b2
GFS2: Wait properly when flushing the ail list

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>
fs/gfs2/log.c