Received: by 10.223.164.202 with SMTP id h10csp623130wrb; Mon, 13 Nov 2017 11:59:30 -0800 (PST) X-Google-Smtp-Source: AGs4zMbQuEGOgf+04BbaqE0ixtdVCGZ1R0qg719iR6DNjR4xcSLiPrrE9+MVAFCeRg/7ZVupsN3w X-Received: by 10.84.168.162 with SMTP id f31mr1001467plb.249.1510603169874; Mon, 13 Nov 2017 11:59:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510603169; cv=none; d=google.com; s=arc-20160816; b=pKHgHok2TFY11c0bEpML2UkZmFHMkr1UL8Ouxg2udsbX4eNvC/J1z4ugIlSDPhEI75 rePOMOaAdglKqwX6I1CLgRPWAAa0duqto0hS5tvWwZdFCJn9pxV3yZ91wzGPCI4z8Uh+ 6B/gDq+iekOr8e9I3Xt8wJdVsUeSfAEjTe6kA73vE3KTFt6V0D5l+8gEDm9DdAP1SXNW flGyfNuaRZ9qQ620wMdiXt+7LdMPOIP3ENIeDy6XB5Cm07jD9HJyleaIB7a4knDmXcxk EIizT4lEqcK/lWgAqkHl7oVNrdNJAhBz0/dpubijUdAPl+Nrnw3n/6ewY68nc+ZQ0fmu iK9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dmarc-filter:arc-authentication-results; bh=GgodmI82nTWIQECCFknYeikilgE2ABNqp0S4r2+Rx1s=; b=ZHdzbES1xzZa59SKY0WwXFRe+ALDnsgzd6Be1MGMetiKlZhqT3s5sAtUP63HR+4qrE DzEUhKR4PqZpaOgcuWUr15bI3jMB31EjVmOIklv08OcPNw8aIFrwcDt4cTXjE1mzLQjB g8ivRvMNY+2GHdBOY+BtHPi5xLJVXZMJ6V0Frh+28k+jxw99hhlwm9XwB5xVLwPiEziS liQ4A0rnMKrv8nMQYePlXEHMuosDaQts28Df0pHiZI/B/vSatJdWRL5j4xeitxti8FcF tw6UYqXrE/RyvziwSBiZcZYvElmhU7cPKpNpcNyM9yfiWSmTc+a8pYKFUgSvjLloCv9B Nlpw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p5si14192274pga.743.2017.11.13.11.59.17; Mon, 13 Nov 2017 11:59:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755153AbdKMT6f (ORCPT + 87 others); 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 Received: from kernel.org (unknown [199.201.64.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9048621903; Mon, 13 Nov 2017 19:58:31 +0000 (UTC) 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 Precedence: bulk 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 From 1583982028360286738@xxx Mon Nov 13 19:56:18 +0000 2017 X-GM-THRID: 1583901042028495922 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread