diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2018-08-02 11:09:32 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2018-08-02 11:09:32 -0400 |
commit | 1348704cb4f7cf9d5a09fe686c3900a51fcdab6c (patch) | |
tree | 9905a00b861e99aa7a5c571528d45ec39e1cda1a | |
parent | e743ed71af266d100762d6dd656161240fceba7f (diff) | |
download | longterm-queue-4.12-1348704cb4f7cf9d5a09fe686c3900a51fcdab6c.tar.gz |
bio: drop patch n/a for 4.12.x
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r-- | queue/block-throttle-avoid-double-charge.patch | 113 | ||||
-rw-r--r-- | queue/series | 1 |
2 files changed, 0 insertions, 114 deletions
diff --git a/queue/block-throttle-avoid-double-charge.patch b/queue/block-throttle-avoid-double-charge.patch deleted file mode 100644 index 157cefa..0000000 --- a/queue/block-throttle-avoid-double-charge.patch +++ /dev/null @@ -1,113 +0,0 @@ -From 111be883981748acc9a56e855c8336404a8e787c Mon Sep 17 00:00:00 2001 -From: Shaohua Li <shli@fb.com> -Date: Wed, 20 Dec 2017 11:10:17 -0700 -Subject: [PATCH] block-throttle: avoid double charge - -commit 111be883981748acc9a56e855c8336404a8e787c upstream. - -If a bio is throttled and split after throttling, the bio could be -resubmited and enters the throttling again. This will cause part of the -bio to be charged multiple times. If the cgroup has an IO limit, the -double charge will significantly harm the performance. The bio split -becomes quite common after arbitrary bio size change. - -To fix this, we always set the BIO_THROTTLED flag if a bio is throttled. -If the bio is cloned/split, we copy the flag to new bio too to avoid a -double charge. However, cloned bio could be directed to a new disk, -keeping the flag be a problem. The observation is we always set new disk -for the bio in this case, so we can clear the flag in bio_set_dev(). - -This issue exists for a long time, arbitrary bio size change just makes -it worse, so this should go into stable at least since v4.2. - -V1-> V2: Not add extra field in bio based on discussion with Tejun - -Cc: Vivek Goyal <vgoyal@redhat.com> -Cc: stable@vger.kernel.org -Acked-by: Tejun Heo <tj@kernel.org> -Signed-off-by: Shaohua Li <shli@fb.com> -Signed-off-by: Jens Axboe <axboe@kernel.dk> - -diff --git a/block/bio.c b/block/bio.c -index 8bfdea58159b..9ef6cf3addb3 100644 ---- a/block/bio.c -+++ b/block/bio.c -@@ -599,6 +599,8 @@ void __bio_clone_fast(struct bio *bio, struct bio *bio_src) - bio->bi_disk = bio_src->bi_disk; - bio->bi_partno = bio_src->bi_partno; - bio_set_flag(bio, BIO_CLONED); -+ if (bio_flagged(bio_src, BIO_THROTTLED)) -+ bio_set_flag(bio, BIO_THROTTLED); - bio->bi_opf = bio_src->bi_opf; - bio->bi_write_hint = bio_src->bi_write_hint; - bio->bi_iter = bio_src->bi_iter; -diff --git a/block/blk-throttle.c b/block/blk-throttle.c -index 825bc29767e6..d19f416d6101 100644 ---- a/block/blk-throttle.c -+++ b/block/blk-throttle.c -@@ -2226,13 +2226,7 @@ bool blk_throtl_bio(struct request_queue *q, struct blkcg_gq *blkg, - out_unlock: - spin_unlock_irq(q->queue_lock); - out: -- /* -- * As multiple blk-throtls may stack in the same issue path, we -- * don't want bios to leave with the flag set. Clear the flag if -- * being issued. -- */ -- if (!throttled) -- bio_clear_flag(bio, BIO_THROTTLED); -+ bio_set_flag(bio, BIO_THROTTLED); - - #ifdef CONFIG_BLK_DEV_THROTTLING_LOW - if (throttled || !td->track_bio_latency) -diff --git a/include/linux/bio.h b/include/linux/bio.h -index 82f0c8fd7be8..23d29b39f71e 100644 ---- a/include/linux/bio.h -+++ b/include/linux/bio.h -@@ -492,6 +492,8 @@ extern unsigned int bvec_nr_vecs(unsigned short idx); - - #define bio_set_dev(bio, bdev) \ - do { \ -+ if ((bio)->bi_disk != (bdev)->bd_disk) \ -+ bio_clear_flag(bio, BIO_THROTTLED);\ - (bio)->bi_disk = (bdev)->bd_disk; \ - (bio)->bi_partno = (bdev)->bd_partno; \ - } while (0) -diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h -index a1e628e032da..9e7d8bd776d2 100644 ---- a/include/linux/blk_types.h -+++ b/include/linux/blk_types.h -@@ -50,8 +50,6 @@ struct blk_issue_stat { - struct bio { - struct bio *bi_next; /* request queue link */ - struct gendisk *bi_disk; -- u8 bi_partno; -- blk_status_t bi_status; - unsigned int bi_opf; /* bottom bits req flags, - * top bits REQ_OP. Use - * accessors. -@@ -59,8 +57,8 @@ struct bio { - unsigned short bi_flags; /* status, etc and bvec pool number */ - unsigned short bi_ioprio; - unsigned short bi_write_hint; -- -- struct bvec_iter bi_iter; -+ blk_status_t bi_status; -+ u8 bi_partno; - - /* Number of segments in this BIO after - * physical address coalescing is performed. -@@ -74,8 +72,9 @@ struct bio { - unsigned int bi_seg_front_size; - unsigned int bi_seg_back_size; - -- atomic_t __bi_remaining; -+ struct bvec_iter bi_iter; - -+ atomic_t __bi_remaining; - bio_end_io_t *bi_end_io; - - void *bi_private; --- -2.15.0 - diff --git a/queue/series b/queue/series index 10dc342..e3f4a54 100644 --- a/queue/series +++ b/queue/series @@ -59,7 +59,6 @@ mfd-twl4030-audio-Fix-sibling-node-lookup.patch mfd-twl6040-Fix-child-node-lookup.patch ALSA-rawmidi-Avoid-racy-info-ioctl-via-ctl-device.patch ALSA-usb-audio-Add-native-DSD-support-for-Esoteric-D.patch -block-throttle-avoid-double-charge.patch parisc-Align-os_hpmc_size-on-word-boundary.patch parisc-Hide-Diva-built-in-serial-aux-and-graphics-ca.patch Revert-parisc-Re-enable-interrupts-early.patch |