Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3990196imu; Mon, 10 Dec 2018 11:08:05 -0800 (PST) X-Google-Smtp-Source: AFSGD/Xw1/ulLOUJvPg89g0/0ZgxB18y1/kOANASEl4bKZQhDMxk9r3khFbv2jrZLHIyP5KmsQ5/ X-Received: by 2002:a63:fb46:: with SMTP id w6mr11985577pgj.321.1544468885584; Mon, 10 Dec 2018 11:08:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544468885; cv=none; d=google.com; s=arc-20160816; b=yuhaKtbc2Wt4gI54mhJD8ygwo757V2CCF3JsjYDqoeh7erVW6QVXoHEckoj724qnoC 4S3qO1bjDHcK1DOYstAoynba1cHJOFQ5lBJSQF/IDiLNslEsvl+VGCvUxj+dn3RtDW21 gxgd0JbNHftkQgampjpetrdog4jXsnDJYE5eO6m63W1QddK8foeUK5Y2W57EdPnKoznp EgZmuhOwKVFx8CB1QM+tL8jU8El6rFD5fq9gG12xmdoMt6p/5nEVv3/rQu64BPr+yDUL 2a7DQjSuZ7JZ6Ke+PigHy3BT5x7nczBgH3m322pOBtzf9bUsw5OEK6TAtFpKKfJsZ/rH dxTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=kJ0Uh/sz9+ZfwHuRQutOjBLD6AcNatJC4J4LKf97Spw=; b=UGjBtMSFPFylVnV74JxDyLaoL5Vvbev0sX4TGAgbEXZc/WqktCSNPKg5hGOYqV7c9O 87C32ubO4AO48Ni96f4Pv5RsLJOrXyt7MeYUlYuh/h7MIhEpLpAYkPTeupn5h9vb37Lq f2qMlvllkmZx70Dy2oyjRZN8Pu+sPk5TfmfFw5Vxsp9RBVEYDfDWmjvUY9+d4fZi6iqQ 8cPHbtkehJ6Yr1od6+6kw0uLKNmfmckeROiHCsLHJKqXPwTmAK3ihWeb8gtIJotulZwX cLSVB7Tce6XeQrVmsrqiHo3S6zGk8xarTEtla3sex1Sjag85oIDavzX6nQPO8gRTYx71 6iIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=ootPNiaX; 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 b11si11123031pfo.240.2018.12.10.11.07.50; Mon, 10 Dec 2018 11:08: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; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=ootPNiaX; 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 S1728216AbeLJQ6R (ORCPT + 99 others); Mon, 10 Dec 2018 11:58:17 -0500 Received: from mail-it1-f195.google.com ([209.85.166.195]:54224 "EHLO mail-it1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728192AbeLJQ6Q (ORCPT ); Mon, 10 Dec 2018 11:58:16 -0500 Received: by mail-it1-f195.google.com with SMTP id g85so18378549ita.3 for ; Mon, 10 Dec 2018 08:58:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=kJ0Uh/sz9+ZfwHuRQutOjBLD6AcNatJC4J4LKf97Spw=; b=ootPNiaXJohTA5J3F8DAZAYMKokXrJm+GhTQrrlKJNHsQFKjr6fJ3lC6DyiQKJSVVc qPRVJmV6ckg/V45QIigFJe2TXPw40fKYI0zn1sCwPG9CsLc2lXIDW8HY9sA5hhn2xmUR W9n5f/wlrB8fcdfl4cMqkZF55VFrEAWG++nA/haOxg42h3V00jxV7cUQ9tWK2SbSebf0 OfW2FlgydOCVhXSLyuK7LbLeT1dYdrLzI/xmPvid4sEuDxEtyJQa89J70D+v8NP/ovZo H036TJOvPRmOeC4cR3ryggXUYGeDXAVCG1ng8AO8Nq9Yk78iR9Y1qccOn2Q93Dnz+jA5 HOAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=kJ0Uh/sz9+ZfwHuRQutOjBLD6AcNatJC4J4LKf97Spw=; b=j+u+VREtStvQGCnRK3xWAGO3zgpxInFRcqnsWZxfwhvEMETmKvz8k7Kl/szGo2HGMq +U7gF6/BD0iskH9oRGSkDDI8w1Q0GBXEmHQbx/PJTS2WNAjph2rF/1vukmDGrKT55Gk0 TzIxWTsn+6YCRLKD45JGYTx8pRZEagJ2KixrMcu7OD6Zqu9aFyFlSiszBzO6neJ1Tzqp mbo2jhKMWMv9JtNfmnf5DGhZKe2XVf2QHuZMqhxiMjeMq1OY1tVBZqaHg2F512M8xRd4 2fPMnjoLdiT2IESKn78nk9dC7LayUnYpKYG2RpVaIqhJKdEI5kLTw6D8UIjb15ZiDX50 FsOw== X-Gm-Message-State: AA+aEWbZ56flXf+iO72h/MqfTyFCQoWinTpnEmuLLXur+jPuQvX5YFk/ asgBfWLTQR+ZF/s6Wre4B7IumL7S2Tk= X-Received: by 2002:a24:5084:: with SMTP id m126mr11134390itb.100.1544461095122; Mon, 10 Dec 2018 08:58:15 -0800 (PST) Received: from [192.168.1.56] ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id h139sm6647668ith.24.2018.12.10.08.58.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Dec 2018 08:58:14 -0800 (PST) Subject: Re: [PATCH] block: fix iolat timestamp and restore accounting semantics To: Dennis Zhou , Tejun Heo , Johannes Weiner , Josef Bacik Cc: kernel-team@fb.com, linux-block@vger.kernel.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org References: <20181210163510.58985-1-dennis@kernel.org> From: Jens Axboe Message-ID: Date: Mon, 10 Dec 2018 09:58:13 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181210163510.58985-1-dennis@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/10/18 9:35 AM, Dennis Zhou wrote: > The blk-iolatency controller measures the time from rq_qos_throttle() to > rq_qos_done_bio() and attributes this time to the first bio that needs > to create the request. This means if a bio is plug-mergeable or > bio-mergeable, it gets to bypass the blk-iolatency controller. > > The recent series, to tag all bios w/ blkgs in [1] changed the timing > incorrectly as well. First, the iolatency controller was tagging bios > and using that information if it should process it in rq_qos_done_bio(). > However, now that all bios are tagged, this caused the atomic_t for the > struct rq_wait inflight count to underflow resulting in a stall. Second, > now the timing was using the duration a bio from generic_make_request() > rather than the timing mentioned above. > > This patch fixes the errors by accounting time separately in a bio > adding the field bi_start. If this field is set, the bio should be > processed by blk-iolatency in rq_qos_done_bio(). > > [1] https://lore.kernel.org/lkml/20181205171039.73066-1-dennis@kernel.org/ Looks reasonable to me, but it needs a Fixes tag as well. -- Jens Axboe