Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1024508imm; Wed, 1 Aug 2018 09:00:40 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeedXNJOwNn7rP+vZNe/2P471Qh3GEMoSKSFYzCrGV6sxV1iPXLqR8rCp42ri62Ri5qn2Xv X-Received: by 2002:a62:669b:: with SMTP id s27-v6mr27739536pfj.224.1533139240796; Wed, 01 Aug 2018 09:00:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533139240; cv=none; d=google.com; s=arc-20160816; b=D0K9JXUo7TmxasgH9mzDJ7NdQzV5npZ+FrWDOuz1A0Fw5CvspaksAs/oaXdRpbNkv0 BGd0cQcJYPvEViodi3oc2ZGqBaM0TlQ/xVRlJy7NNkW24aYpCDH7p4DdlsGrQ3IYBg4e B0g3OjZHgChehcty7U7dA0gGUeLByvbo3dXbrjd6CqpQcc2Yl18KpQEn2sRRU9i3B1yE WpglBFSTmXptVkfJ8BYlbAH0UtEdyU63u6mSzZp0esIZbrRW39yxQXGCz3xsEesExJQ9 7iCUdIgnQUjC2nTUO0h5/o5/J0oUSN0d11h3ELOvJOIg377kYwKHKxtoqTp36dU7Z0vD VBzQ== 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:dkim-signature:arc-authentication-results; bh=GlRInNjBkUW+U4FuIA+QH8SrANhUCARDDcxz8bcr3Rg=; b=CtNKu0u+YwZxi7Cx7nhEFbYMDviHG1KNdpvGkV4birtLas135h6ABhR0r4laZePJGo Oq6fuvTz5eclN3uLcli6YBzUke65s0u1nQ78AnOpjoQJIAuEEV6tOTtr8PZYz5Fcq+T9 mORuYOJ3N4l1nLLmlGLmUs/NeHI+k/VHyABe0MzMx6UCcNjHGMNqd59S7rj/dEV9tld5 WagTTGXkvXLTM2lKvDzLptOJYZhsHbmnI4yBKYrqdTdl9oCXZYXb47TbKzf+K+GA9haW pPE00iaFPN1PQU2bjmdNOLvxftm31diohAIloW15LwIc61Ce19JDoCjWuajTAcMvFCw/ I7dA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=Fma8w0Ux; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v10-v6si4532457pfe.173.2018.08.01.09.00.25; Wed, 01 Aug 2018 09:00:40 -0700 (PDT) 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=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=Fma8w0Ux; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389989AbeHARp4 (ORCPT + 99 others); Wed, 1 Aug 2018 13:45:56 -0400 Received: from mail-qt0-f194.google.com ([209.85.216.194]:41934 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389643AbeHARp4 (ORCPT ); Wed, 1 Aug 2018 13:45:56 -0400 Received: by mail-qt0-f194.google.com with SMTP id e19-v6so20423517qtp.8 for ; Wed, 01 Aug 2018 08:59:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=GlRInNjBkUW+U4FuIA+QH8SrANhUCARDDcxz8bcr3Rg=; b=Fma8w0Uxqdu8wrbW/Vm9G3erSlDrEb0lgSgzp9WSgMTVKQzTtigTsN1F31KzOEPIcm DM+5shJxz0CNOlITcJSduE5mkZQTPuQWU9N2ikIliNh8r1ureq+sk3iia3tlWsPOFBAs K36pmEU35XtBPW99eXpCwIoP7cEBUborVPcYQCtl7ldJJSAUkjXPkOZ7ZUD+Ty7Vrd/6 XiDYt0oDWB6vHaQd+tNVeRumNYERvkS+Ju9fu8T1BW7N08m45J2DX68e4XUuAldd1w2p oUTOqmGnV11kgOw5328Bg+7NIw6rib3NBoS0YNiGxZaS2/igPT+JaWtLQ3YT6ILcyz8l 6afQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=GlRInNjBkUW+U4FuIA+QH8SrANhUCARDDcxz8bcr3Rg=; b=SMNPirtQ+YXYmZRthUEIa3GR/vmI61N7BGwec4iG4Jml1Mv99UBWNtngB92L85IxYl pHW9+hTw3DjUVResOYSSQBU20ak0ekt4U4dsquyRXYSbTSLTy99WUrHPcjloaRBIjy0G rRHhCbwc7ddGewbmeVoIpv6z/8BGWhUdt80LnRQaOo5ODbk0l3yK8eaVWYqem62FBHum XiYlHw9tFraB6qDvYaHgVJ1+gF7Co2YNcbOeNoUgA87jQ7hnkWuE9/Qz9yoCOIQ5/WwJ rIoWNuguzg8+7GESyg3dFN9wpoqXC9y0eG7cOTJmWDhrcnvLyy3xQHkXWa6G+T+JY3gX 3/kA== X-Gm-Message-State: AOUpUlFLhN6gcXM0IY8g8QAkRNNFicF3TjFyECptmiFYqQq1MHeoQNeB NI04rzozEMSzbr2hnIeG1nEzOA== X-Received: by 2002:ac8:3304:: with SMTP id t4-v6mr27086268qta.43.1533139173136; Wed, 01 Aug 2018 08:59:33 -0700 (PDT) Received: from localhost (216.49.36.201.res-cmts.bus.ptd.net. [216.49.36.201]) by smtp.gmail.com with ESMTPSA id h4-v6sm9625792qtp.53.2018.08.01.08.59.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 01 Aug 2018 08:59:32 -0700 (PDT) Date: Wed, 1 Aug 2018 12:02:27 -0400 From: Johannes Weiner To: Dennis Zhou Cc: Tejun Heo , Jens Axboe , Josef Bacik , kernel-team@fb.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] block: make iolatency avg_lat exponentially decay Message-ID: <20180801160227.GA8891@cmpxchg.org> References: <20180801002559.36261-1-dennisszhou@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180801002559.36261-1-dennisszhou@gmail.com> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 31, 2018 at 05:25:59PM -0700, Dennis Zhou wrote: > From: "Dennis Zhou (Facebook)" > > Currently, avg_lat is calculated by accumulating the mean of every > window in a long running cumulative average. As time goes on, the metric > becomes less and less useful due to the accumulated history. > > This patch reuses the same calculation done in load averages to make the > avg_lat metric more lively. Unlike load averages, the avg only advances > when a window elapses (due to an io). Idle periods extend the most > recent window. Bucketing is used to limit the history of avg_lat by > binding it to the window size. So, the window range for 1/exp (decay > rate) is [1 min, 2.5 min) when windows elapse immediately. > > The current sample window size is exposed in the debug info to enable > calculation of the window range. > > Signed-off-by: Dennis Zhou Looks great, thanks Dennis. Once the div build error is fixed, please feel free to add: Acked-by: Johannes Weiner