From 1c29f4306f557ef5d9ed515ec8881f4d1735b058 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Tue, 27 Sep 2016 10:34:19 -0300 Subject: Linux-libre 4.7.5-gnu --- block/bfq-cgroup.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'block') diff --git a/block/bfq-cgroup.c b/block/bfq-cgroup.c index c83d90c99..32cd8ab1c 100644 --- a/block/bfq-cgroup.c +++ b/block/bfq-cgroup.c @@ -638,6 +638,18 @@ static void bfq_bic_update_cgroup(struct bfq_io_cq *bic, struct bio *bio) if (unlikely(!bfqd) || likely(bic->blkcg_serial_nr == serial_nr)) goto out; + /* + * If we have a non-root cgroup, we can depend on that to + * do proper throttling of writes. Turn off wbt for that + * case. + */ + if (bio_blkcg(bio) != &blkcg_root) { + struct request_queue *q = bfqd->queue; + + if (q->rq_wb) + wbt_disable(q->rq_wb); + } + bfqg = __bfq_bic_change_cgroup(bfqd, bic, bio_blkcg(bio)); bic->blkcg_serial_nr = serial_nr; out: -- cgit v1.2.3-54-g00ecf