Received: by 10.223.164.202 with SMTP id h10csp2850735wrb; Sun, 12 Nov 2017 20:30:32 -0800 (PST) X-Google-Smtp-Source: AGs4zMYhlBlu2UKAaD8n+FreSB0slTVB0uBxIpRRiz4JhXiSP6qZu21T3aFHgUTVsntrZBVjfLfS X-Received: by 10.101.73.205 with SMTP id t13mr7487081pgs.289.1510547432582; Sun, 12 Nov 2017 20:30:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510547432; cv=none; d=google.com; s=arc-20160816; b=RvWT2WscEN6CIKvDh9mPle4vzBcLlkVY+l+JIGMIrGJRyV/j+9o3s3w2AUhvEUqh8X hiFIKn8lnXzdjC04xOw8J7vDzRHIjh7LQaUK8iAJbAY0pT69QZizroOs0dt+rXvcx7No R5aJwrRF1CJaAzSlpNxZw5Zb5W9tGE/oVY31B6tCLLBV9R9op7J0sJQHRa0IBKHAs0my zQy59KxD4ag1v3Jd9WS1Q4IoyLBzRtGjckmc3qiYy+x3Mw9L3Hkcwv9DJNxDQRlqOA+j XAUd2MT00Bulfd7ilImMgud9SGNuWUDJUakpeV22WJwoALaER1VLL1TFbtsvNeQJU+Xt TfeA== 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=5ccAdpUp+VVgGiJCuL6A3if9+U1zMpNSexuNnWNqlkE=; b=e7shcg/ofSOZAkYZe4gD9sQLz/ILPS+01vE+2+bZCtjb1HjA4FcUo0yqFYgHuIg2mv wxmfC8q9oF2NnjaoGmnqOkL/R29nFNDwBkiPMv/8RxWnVYqACkSKFuov1Gk0EEBHwFWk uUz9wfS0N14DjQk5Zg9v8D8McutfHVAZMpco2HvsmPfg8aeG+hllFBldaTb/uHMy17Hb 6CZhqqHGFqGUxaZvoWyfWNOXLT94ig6srBEfYTce3YIhF6LMLJ/BcK0q9CYumsSr3D51 jI1HiFB6XO/aKvMHQlb7U0uwuDQL2pUgbJgV+4tZfmQOh9CdzBt50ty7aGDo6mpV6VV1 ZM4A== 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 h82si7028601pfa.196.2017.11.12.20.30.20; Sun, 12 Nov 2017 20:30:32 -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 S1751638AbdKME3o (ORCPT + 87 others); Sun, 12 Nov 2017 23:29:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:54116 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751359AbdKME3n (ORCPT ); Sun, 12 Nov 2017 23:29:43 -0500 Received: from kernel.org (unknown [199.201.64.4]) (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 85D0B21910; Mon, 13 Nov 2017 04:29:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 85D0B21910 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: Sun, 12 Nov 2017 20:29:40 -0800 From: Shaohua Li To: Tejun Heo Cc: Jens Axboe , linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH 1/2] blk-throtl: make latency= absolute Message-ID: <20171113042940.d6lcarmnakuctinn@kernel.org> References: <20171109221924.GB983427@devbig577.frc2.facebook.com> <20171109231212.mbqwyzpmciyshxov@kernel.org> <20171109234258.GD983427@devbig577.frc2.facebook.com> <20171110042713.quytcwbu6g6xwvpt@kernel.org> <20171110154314.GE983427@devbig577.frc2.facebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171110154314.GE983427@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 Fri, Nov 10, 2017 at 07:43:14AM -0800, Tejun Heo wrote: > Hello, Shaohua. > > On Thu, Nov 09, 2017 at 08:27:13PM -0800, Shaohua Li wrote: > > I think the absolute latency would only work for HD. For a SSD, a 4k latency > > probably is 60us and 1M latency is 500us. The disk must be very contended to > > make 4k latency reach 500us. Not sensitive doesn't mean no protection. If the > > use case sets rough latency, say 1ms, there will be no protection for 4k IO at > > all. The baseline latency is pretty reliable for SSD actually. So I'd rather > > I don't understand how that would mean no protection. The latency > naturally includes the queueing time on the host side and, even for a > fast SSD device, it isn't too difficult to saturate the device to the > point where the host-side waiting time becomes pretty long. All > that's necessary is IOs being issued faster than completed and we can > almost always do that. Didn't get this. What did you mean 'queueing time on the host side'? You mean the application think time delay? My point is absolute latency doen't protect as we expected. Let me have an example. Say 4k latency is 60us, BW is 100MB/s. When 4k BW is 50MB/s, the latency is 200us. 1M latency is 500us. If you set the absolute latency to 600us, you can't protect the 4k BW to above 50MB/s. To do the protection, you really want to set the absolute latency below 500us, which doesn't work for the 1M IO. > > keeping the baseline latency for SSD but using absolute latency for HD, which > > can be done easily by setting DFL_HD_BASELINE_LATENCY to 0. > > I don't think that'd be a good interface choice. It's too misleading. > If we actually need to specify baseline + margin, it'd probably be > better to add another notation - say, "+N" - than overloading the > meaning of "N". We don't overload the meaning of "N". Untill your next patch, the "N" actually means "+N". Ponder a little bit, I think 4ms base latency for HD actually is reasonable. We have LATENCY_FILTERED_HD to filter out small latency bios, which come from sequential IO. So remaining IO is random IO. 4k base latency for HD random IO should be ok. Probably something else is wrong. I think we need understand what's wrong for HD throttling first before we make any change. Thanks, Shaohua From 1583694444756245749@xxx Fri Nov 10 15:45:16 +0000 2017 X-GM-THRID: 1583628779065184979 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread