Received: by 10.223.164.202 with SMTP id h10csp88689wrb; Mon, 13 Nov 2017 14:09:06 -0800 (PST) X-Google-Smtp-Source: AGs4zMbt9lbR7Acbv4MfdrELrhlCyDOS9XYaYLamu+afZFMswDFMzIh0saSUxUtbKWuYD2ygXLFn X-Received: by 10.159.247.18 with SMTP id d18mr9943194pls.265.1510610946022; Mon, 13 Nov 2017 14:09:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510610945; cv=none; d=google.com; s=arc-20160816; b=0ozpNExnkTo0ITcIRO3tIdILW/TBv04jnO4HT0dP+urPxo8Io2K0KG3RbyW084TQmO 4uAjMi/cdxmPZixwWAHMBuSsS9xHGK8RNoIxYaqbIUXD+2KOlTlj1XHQTYCBBMrq7WJe GUpKNbGZog7mcg6HG3UUac85HXausBeyZhkz42koTt85MwUTjjUBKbLQpT4HsMosjGHb V7DiqCoTc+WgCv1h5jAC7vZYGLA+wmFZuiHfcQIb05lbLR55huw2ZWlfVCn3B0RRHtGG hr2fTUoxdLK0D8rtesMLZUu9pLV291cEJ+oAHe/vuwLQM1VEX46qtV7m71XgBNy/ZvnF 5qmg== 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=Ip71umvUzx1+/MwDH5oWGaWl2B4DNKe0Qv7zE0VO0pE=; b=vzN06ixWDoJ/H4hPK4iuA/HhURxTl0ziNIfzAl0WSEQBOVDCRUl7ZmBeOggrdvV8lV WzmcZLXgFuXKz1M58vYX7jq/FdOb9UKEe/++qIC8PmB0TX7QsCF16hIrRAALrFEKRIRz mujAwmnqkJKjA7VVgvEwkKkhe8N4L7G7xTJwO2befnmpFIlc4bqdgnn/tE2FDTksRxc3 UUWZDU3L+FXMOIZxOUczquD8z4Q5pJ0SQ88h3lvG0QagQ9qoYkN2LK9e1Juyj8tdC0ts spAQmuScxWiyO3GXzYXFg7JO5u3Yu3we8cVe79XKcvgVcg0qwjTTDTN+n8zdJRehDNju hSEg== 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 u17si11983881pge.390.2017.11.13.14.08.53; Mon, 13 Nov 2017 14:09:05 -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 S1751605AbdKMWIH (ORCPT + 88 others); Mon, 13 Nov 2017 17:08:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:60292 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750929AbdKMWIG (ORCPT ); Mon, 13 Nov 2017 17:08:06 -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 D083E218B0; Mon, 13 Nov 2017 22:08:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D083E218B0 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 14:08:04 -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: <20171113220804.xsnc6cfkyjv7bzhq@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> <20171113042940.d6lcarmnakuctinn@kernel.org> <20171113112710.GG983427@devbig577.frc2.facebook.com> <20171113141849.GH983427@devbig577.frc2.facebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171113141849.GH983427@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 06:18:49AM -0800, Tejun Heo wrote: > Hello, Shaohua. Just a bit of addition. > > On Mon, Nov 13, 2017 at 03:27:10AM -0800, Tejun Heo wrote: > > What I'm trying to say is that the latency is defined as "from bio > > issue to completion", not "in-flight time on device". Whether the > > on-device latency is 50us or 500us, the host side queueing latency can > > be in orders of magnitude higher. > > > > For things like starvation protection for managerial workloads which > > work fine on rotating disks, the only thing we need to protect against > > is excessive host side queue overflowing leading to starvation of such > > workloads. IOW, we're talking about latency target in tens or lower > > hundreds of millisecs. Whether the on-device time is 50 or 500us > > doesn't matter that much. > > So, the absolute latency target can express the requirements of the > workload in question - it's saying "if the IO latency stays within > this boundary, regardless of the underlying device, this workload is > gonna be happy enough". There are workloads which are this way - > e.g. it has some IOs to do and some deadline requirements (like > heartbeat period). For those workloads, it doesn't matter what the > underlying device is. It can be a rotating disk, or a slow or > lightening-fast SSD. As long as the absolute target latency is met, > the workload will be happy. I think this is what we don't agree with. The user doesn't really care about the IO latency. What user care about is 'read' syscall latency or 'fsync' syscall latency. The syscall could do several 4k IO or 1M IO or mixed. To meet the syscall latency target, we must control the latency for each IO. If we use absolute latency, it can only control some IOs. In this case, it's very likely the syscall latency requirement isn't met. So we do need to know what the underlying device is. That said, absolute latency is useful for HD. But on the other hand, HD baseline is always 4ms for any size IO. So absolute latency = 4ms + slack, unless you want to specify a smaller than 4ms absolute latency. Thanks, Shaohua From 1583960856828435886@xxx Mon Nov 13 14:19:47 +0000 2017 X-GM-THRID: 1583628779065184979 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread