stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "bcache: fix sequential large write IO bypass" has been added to the 4.13-stable tree
@ 2017-09-22 12:04 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-09-22 12:04 UTC (permalink / raw)
  To: tang.junhui, axboe, bcache, gregkh, kent.overstreet
  Cc: stable, stable-commits


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 <stable@vger.kernel.org> know about it.


>From c81ffa32a214c84b08900fbc9d432187bd948eba Mon Sep 17 00:00:00 2001
From: Tang Junhui <tang.junhui@zte.com.cn>
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 <tang.junhui@zte.com.cn>

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.

Signed-off-by: tang.junhui <tang.junhui@zte.com.cn>
Reviewed-by: Kent Overstreet <kent.overstreet@gmail.com>
Reviewed-by: Eric Wheeler <bcache@linux.ewheeler.net>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/md/bcache/request.c |    6 ------
 1 file changed, 6 deletions(-)

--- a/drivers/md/bcache/request.c
+++ b/drivers/md/bcache/request.c
@@ -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 tang.junhui@zte.com.cn 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-09-22 12:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-22 12:04 Patch "bcache: fix sequential large write IO bypass" has been added to the 4.13-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).