diff options
author | Dave Chinner <dchinner@redhat.com> | 2010-02-05 00:45:25 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2010-03-01 09:08:26 -0500 |
commit | e5884636da3a128617032747654284ae7badc7ff (patch) | |
tree | 39c82c529a112d4b894e9eb9552817f03d3d67f5 /fs/gfs2 | |
parent | 1ccaba3056796ab1f933736d763ffcd1958866cd (diff) |
GFS2: ordered writes are backwards
When we queue data buffers for ordered write, the buffers are added
to the head of the ordered write list. When the log needs to push
these buffers to disk, it also walks the list from the head. The
result is that the the ordered buffers are submitted to disk in
reverse order.
For large writes, this means that whenever the log flushes large
streams of reverse sequential order buffers are pushed down into the
block layers. The elevators don't handle this particularly well, so
IO rates tend to be significantly lower than if the IO was issued in
ascending block order.
Queue new ordered buffers to the tail of the ordered buffer list to
ensure that IO is dispatched in the order it was submitted. This
should significantly improve large sequential write speeds. On a
disk capable of 85MB/s, speeds increase from 50MB/s to 65MB/s for
noop and from 38MB/s to 50MB/s for cfq.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/lops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c index de97632ba32f..adc260fbea90 100644 --- a/fs/gfs2/lops.c +++ b/fs/gfs2/lops.c | |||
@@ -528,9 +528,9 @@ static void databuf_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le) | |||
528 | gfs2_pin(sdp, bd->bd_bh); | 528 | gfs2_pin(sdp, bd->bd_bh); |
529 | tr->tr_num_databuf_new++; | 529 | tr->tr_num_databuf_new++; |
530 | sdp->sd_log_num_databuf++; | 530 | sdp->sd_log_num_databuf++; |
531 | list_add(&le->le_list, &sdp->sd_log_le_databuf); | 531 | list_add_tail(&le->le_list, &sdp->sd_log_le_databuf); |
532 | } else { | 532 | } else { |
533 | list_add(&le->le_list, &sdp->sd_log_le_ordered); | 533 | list_add_tail(&le->le_list, &sdp->sd_log_le_ordered); |
534 | } | 534 | } |
535 | out: | 535 | out: |
536 | gfs2_log_unlock(sdp); | 536 | gfs2_log_unlock(sdp); |