Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2389982imm; Thu, 2 Aug 2018 10:44:34 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd2Yy9sbpJp7N2yDbY/VuTqyEP7mZkEF7GCjp6ZqtNcin7NlQEoX73X0iyI32vNORvKtltm X-Received: by 2002:a63:2dc1:: with SMTP id t184-v6mr449896pgt.62.1533231874788; Thu, 02 Aug 2018 10:44:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533231874; cv=none; d=google.com; s=arc-20160816; b=Tw+W5iY2HUWNgpVv+bjNFY0MUN6YZtDL5dti5Fb1QTBZTuk2Q79MzIVuWbmwCCpIqM Vrn+siMsGJJfCilAJK2w+vHeckkDPyGghm7hTG17PGGUI/RlXBDV8xT6OT8icuCfcJMq VhmDE7gpBYGZ/j23xQieRLrbW39CHkxp0kQUv5eQv4q7T9xFE8YyV7IEijiZ8uuaruLT uFqNI1p+O2PEM1lHMEAV9ycv/7+ZztSJuBhe54VDettlxnx8LBWYK2I1JkiPG5B3qk6m zmb8/M4CSJFM64jj0u9It2adR6BGUMp1iXy2+ff9bYO5dU5aVtWQ6pCXUuXSBV8oYGlZ 05Vg== 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 :arc-authentication-results; bh=34yS/K9j2BHERKv+QFc9VaC9uxmcijLNrX90DPOpGI4=; b=vLd5MOy6mtWfIscNxdDtsHS1TOOe01WoIl641zgGxDXTI52gu4efPQOsbmC7sJC/uk FonIiQ09RDJFiw0Zk7aDjBNpf98ooyponJ9i8q/YKmi+y02m/6uOxv/BnqvM5x6axdLP GCxume89QZZ6zJ3x2CyQjy1X633OOcaVJ8gFExk3aI5Z8Jm2dcjDgEXaz+vjxrMZg4dL F04MCEm613rrAGj7oM7gMdnEDM/zXXGqq+SqPXSVqQsBASN6EMkrWsvAfLjNPICiulrC V1huQR7AyrHXqYndiryStNLcxxkqGeVJH9gyrjbV4WqjMlPN024IKJtOgj2tEcx5tkvn BH/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=mSKdECKM; 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 o1-v6si1796655plk.77.2018.08.02.10.44.19; Thu, 02 Aug 2018 10:44:34 -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=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=mSKdECKM; 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 S2387874AbeHBRuX (ORCPT + 99 others); Thu, 2 Aug 2018 13:50:23 -0400 Received: from mail-io0-f195.google.com ([209.85.223.195]:38976 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387835AbeHBRuW (ORCPT ); Thu, 2 Aug 2018 13:50:22 -0400 Received: by mail-io0-f195.google.com with SMTP id o22-v6so2360096ioh.6 for ; Thu, 02 Aug 2018 08:58:36 -0700 (PDT) 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=34yS/K9j2BHERKv+QFc9VaC9uxmcijLNrX90DPOpGI4=; b=mSKdECKMLmHxMQvIHgBVaEFsfdt4yIyNWHnjQ8LBEX2M/riD6EuKGRp4+aZ8WVyfMI 5xb6S7MdQKgrtPapKxFdp4p/puoJ2ncTGTSKYCNhTr+6Ru81Z7G930PxxUyq5VXySjCn +qqr60NZJjIdcMqpvRe92wZ73IIZ93NUwcAzAx3m9SfROi8Y6VMwdgaltrenrtX0WYwp 0hjGAPXyLcuMhZi9KafuT+zN05pvMIfLC8mBv842FNMWdGv2gpfv/P152/zRf/QR3QpG J81MiX+sIRX64K/7SQw/nvp20VUctyYpyUI4dyfiIQtQySOmnvsc2Igml7TN05UOVtGr nRAg== 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=34yS/K9j2BHERKv+QFc9VaC9uxmcijLNrX90DPOpGI4=; b=pT4zb2IMhCEknZbZVZMOVc+xwHabDazvIEvpOb7c6G4kD+fB0y4k4uyRPJ6kTIZ08X 8HweRZWGUzmvHgAn0LIgQGNNhqolI5BLac2TlqCFlA3X5HvfjVb7JPrlI77okWnJ0/8B uWtzdi2CwQA4OBvANToaOJ42S820gv7HcK4KJNgwlTkponBEjRWfEpsDIdXuoueO37Gg xicQ1ybvMiE1Mtye0PLCFOV+Z8qLQABZacx/KzVUFSamGwNMCmvMXX8htLZMLOWeGz3T a12Zk6z+lV56p4QKHZDiX+WubNeLuFwKfbB9PBYQAudTNyz8CAKX4h7uJV5geZWryQHi 8lpg== X-Gm-Message-State: AOUpUlEHH8s7Oqjx8FEgvxdI9Ys0Xv8Q0AOMalSOdFb/25Shwj3MMMxZ LdD8QhANfHaijCGUC/6kgngavAFYQVo= X-Received: by 2002:a6b:1c07:: with SMTP id c7-v6mr3059510ioc.298.1533225515782; Thu, 02 Aug 2018 08:58:35 -0700 (PDT) Received: from [192.168.1.212] (107.191.0.158.static.utbb.net. [107.191.0.158]) by smtp.gmail.com with ESMTPSA id x14-v6sm1381051ita.18.2018.08.02.08.58.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Aug 2018 08:58:34 -0700 (PDT) Subject: Re: [PATCH v3] block: make iolatency avg_lat exponentially decay To: Dennis Zhou , Tejun Heo , Josef Bacik , Johannes Weiner Cc: kernel-team@fb.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180802061541.49173-1-dennisszhou@gmail.com> From: Jens Axboe Message-ID: <24d21a5c-f061-63ca-4571-ed32f1c8e2d3@kernel.dk> Date: Thu, 2 Aug 2018 09:58:32 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <20180802061541.49173-1-dennisszhou@gmail.com> 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 8/2/18 12:15 AM, 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. Applied for 4.19, thanks Dennis. -- Jens Axboe