From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755158AbdKMT6f (ORCPT ); Mon, 13 Nov 2017 14:58:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:38372 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755061AbdKMT6c (ORCPT ); Mon, 13 Nov 2017 14:58:32 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9048621903 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=shli@kernel.org Date: Mon, 13 Nov 2017 11:58:30 -0800 From: Shaohua Li To: Tejun Heo Cc: axboe@kernel.dk, linux-kernel@vger.kernel.org, kernel-team@fb.com, lizefan@huawei.com, hannes@cmpxchg.org, cgroups@vger.kernel.org, guro@fb.com Subject: Re: [PATCH 7/7] blk-throtl: don't throttle the same IO multiple times Message-ID: <20171113195830.ij3god7gdrj4u4ax@kernel.org> References: <20171112222613.3613362-1-tj@kernel.org> <20171112222613.3613362-8-tj@kernel.org> <20171113040716.kaheegc4qub42n6z@kernel.org> <20171113111348.GF983427@devbig577.frc2.facebook.com> <20171113155745.GI983427@devbig577.frc2.facebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171113155745.GI983427@devbig577.frc2.facebook.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 13, 2017 at 07:57:45AM -0800, Tejun Heo wrote: > Hello, > > On Mon, Nov 13, 2017 at 03:13:48AM -0800, Tejun Heo wrote: > > You're right. If we wanna take this approach, we need to keep the > > throttled flag while cloning. The clearing part is still correct tho. > > Without that, I get 1/4 bw limit enforced. Hmm... I'm not quite sure > > where that 1/4 is coming from tho. Will investigate more. > > Okay, this is because when we spiit, the split bio is the first part > which gets issued and then the orignal bio is wound forward and > requeued. So, for the splits, the original bio is the one which gets > trimmed in the front and requeued, so not clearing BIO_THROTTLED is > enough. I think we should still copy BIO_THROTTLED on clones so that > we don't get suprises w/ other bio drivers. Oh, I think there is a better solution. Not adding a new bdev is possible. We always set the BIO_THROTTLED flag after block-throttle and copy the flag in clone. In bio_set_dev, we clear the flag. This should work I think. Thanks, Shaohua