Skip to contentSkip to conversation

Patch "bcache: fix sequential large write IO bypass" has been added to the 4.13-stable tree

PATCH [email protected] 1 participant 1 message Sep 22, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

bcache: fix sequential large write IO bypass

to the 4.13-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
bcache-fix-sequential-large-write-io-bypass.patch
and it can be found in the queue-4.13 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From c81ffa32a214c84b08900fbc9d432187bd948eba Mon Sep 17 00:00:00 2001

From: Tang Junhui <[email protected]>
Date: Wed, 6 Sep 2017 14:25:52 +0800
Subject: bcache: fix sequential large write IO bypass
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

From: Tang Junhui <[email protected]>

commit c81ffa32a214c84b08900fbc9d432187bd948eba upstream.

Sequential write IOs were tested with bs=1M by FIO in writeback cache mode, these IOs were expected to be bypassed, but actually they did not. We debug the code, and find in check_should_bypass():

    if (!congested &&
        mode == CACHE_MODE_WRITEBACK &&
        op_is_write(bio_op(bio)) &&
        (bio->bi_opf & REQ_SYNC))
        goto rescale

that means, If in writeback mode, a write IO with REQ_SYNC flag will not be bypassed though it is a sequential large IO, It's not a correct thing to do actually, so this patch remove these codes.

---
 drivers/md/bcache/request.c |    6 ------
 1 file changed, 6 deletions(-)
drivers/md/bcache/request.c +0 -6
@@ -400,12 +400,6 @@ static bool check_should_bypass(struct c
 	if (!congested && !dc->sequential_cutoff)
 		goto rescale;
 
-	if (!congested &&
-	    mode == CACHE_MODE_WRITEBACK &&
-	    op_is_write(bio->bi_opf) &&
-	    op_is_sync(bio->bi_opf))
-		goto rescale;
-
 	spin_lock(&dc->io_lock);
 
 	hlist_for_each_entry(i, iohash(dc, bio->bi_iter.bi_sector), hash)

Patches currently in stable-queue which might be from [email protected] are

queue-4.13/bcache-do-not-subtract-sectors_to_gc-for-bypassed-io.patch queue-4.13/bcache-correct-cache_dirty_target-in-__update_writeback_rate.patch queue-4.13/bcache-fix-for-gc-and-write-back-race.patch queue-4.13/bcache-initialize-dirty-stripes-in-flash_dev_run.patch queue-4.13/bcache-fix-sequential-large-write-io-bypass.patch