Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1055142imm; Wed, 1 Aug 2018 09:27:33 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf+wEJdJEk9GUUQQV+A+PicPxSTgodv7Cpi69D0kXctwFV5Tn5ke2t1c2jkDBtGKSOnSdbw X-Received: by 2002:a62:e511:: with SMTP id n17-v6mr14560549pff.210.1533140853325; Wed, 01 Aug 2018 09:27:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533140853; cv=none; d=google.com; s=arc-20160816; b=DZqMKNRlSH4pmsXclND7ul9gmXbWfqIeAZkJiQsv2wOeHqLS7gMBRGIHuMxCz2kuaz qcL/fxOnLsxUfdAInagX46tsKLbJTT16ySh7bExZQPyce5Jx0W17natL9jpmSvUVrsfS kdB1uI6pQuMUZw3s256bM84PwakEFJJ0hpXIC8Gjcs5djM4xLFrFGWA9UsUQwM1koC2f tKenyjuqLXpc6Dlh0opU+dEpCF3SodNAtxNaZF91XLseEdelvN9ydMCkQ0RL38QBs10V DPokKYRlD0CL2w+H7K/VI2NR/7fOhX+qDcfTp0F/X2hRwWRMSnMHnFT71/1efBshSKvE rV2w== 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=jTLGWpgqCyvqaPeODeGNNaLOck8/amA8MikEaNKjB/g=; b=JILnTrLZ2WsVLS8RWJEw8b+m+2fV20qNtf9C4+ZsewlesacV/Q5PqIqYOo9OuNN/Mh mKCrnm075Gn5fPDVAQeXHUOL5J+8AHddMihFrQlvZDQjlZfcVYnZsQXaXvxjrkXgR5OM MiHOZ1hjKUf5+Y4U82+HKd/YUvk/Sx/zEWedY6T3+IFPWd0h/WSOklhuyktcNGWo3QTg dswulrwc6gv3HSP7sHF1ET6vgTI66UgCEMI15Sgq0bmt6iCNSl2ZN5LkPxJjPWDu90Kv hTrrDyn2AjrYcjIsdYesNhobeRlsPrNEaQD8jWxRKdKRacoPVh7kwy+XAnnODh3mdRKU UMaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@toxicpanda-com.20150623.gappssmtp.com header.s=20150623 header.b=ElrZTSqt; 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 h16-v6si17891072pgb.39.2018.08.01.09.27.19; Wed, 01 Aug 2018 09:27:33 -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=@toxicpanda-com.20150623.gappssmtp.com header.s=20150623 header.b=ElrZTSqt; 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 S2390210AbeHASMp (ORCPT + 99 others); Wed, 1 Aug 2018 14:12:45 -0400 Received: from mail-qt0-f196.google.com ([209.85.216.196]:44312 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389836AbeHASMp (ORCPT ); Wed, 1 Aug 2018 14:12:45 -0400 Received: by mail-qt0-f196.google.com with SMTP id b15-v6so20526082qtp.11 for ; Wed, 01 Aug 2018 09:26:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=jTLGWpgqCyvqaPeODeGNNaLOck8/amA8MikEaNKjB/g=; b=ElrZTSqts1z2+nvuGXoEWW83WeCax4OtBDwoZukUyJOmfzVbmvQOAZfjHcc5WtUX5u N/NK8nQuK17oytWjzXi8GKuDnzwaAod0jGtXqqFFCB5wYTyG/dVulQuiSdcZtR4wXft6 SO9CRL4ho0xMxFYV2iVE264bkiiLxaIn9RxBuw//KrxG5VC37u1oaPVpHBVH2d/ZMQnf KcWete2pzJCkDzFaZv29L+KVxj6Pz5/1yBERIs5YabSVIwzscbkTOw4FhkBjZFj4el5d aD5UzAMrWv4nbIy6G1wZja/5uZJo89jU2nufEXRnu2fEgOm15JD1UH0ksZDZz4kyRHC0 /uiw== 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=jTLGWpgqCyvqaPeODeGNNaLOck8/amA8MikEaNKjB/g=; b=Vcp35tyl+qJyzmDwSNMKVVCB6wMnzA3w95lzEp16IAIAyZDPPutAn7JOgYRh73/1cX lOKnSB7dRAwF0hpUVrL+7k6TNsJnSvyLvgnbAhXxTi7H4fNwYWnUsVHJQYEg1UOX7xhx tRJHg6RnGUxV9S08c6LKp7ptyJ730Lq6uo4L4aauh2gga8FrnUhtfhZI9oj+Xj/6to8t 1pKcuKYJBEelDauNTzO5N+SRpIKl5FIOooPrtwSS43IB91UPpN9X3yW0PjYnIoRoLGzx IOI1dcQs8B4mAt2YFeROGYzMqZiY/7eOCl2ZV88K0ixzQBX0kr17DY69eEx+QnwNwjcZ lyhw== X-Gm-Message-State: AOUpUlHgOH5Jaek3n02a9GEmaf681i2nk5A4Jv+y1/xtERAMC2vHAL70 JC+R/IRu/J1Ud1nZzj63fxU1+w== X-Received: by 2002:ac8:4457:: with SMTP id m23-v6mr26027333qtn.289.1533140774522; Wed, 01 Aug 2018 09:26:14 -0700 (PDT) Received: from localhost ([107.15.81.208]) by smtp.gmail.com with ESMTPSA id 190-v6sm9979233qkg.31.2018.08.01.09.26.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 01 Aug 2018 09:26:13 -0700 (PDT) Date: Wed, 1 Aug 2018 12:26:13 -0400 From: Josef Bacik To: Dennis Zhou Cc: Tejun Heo , Jens Axboe , Josef Bacik , kernel-team@fb.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Johannes Weiner Subject: Re: [PATCH v2] block: make iolatency avg_lat exponentially decay Message-ID: <20180801162612.neoq7sm5wzxl6fiu@destiny> 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: NeoMutt/20170714 (1.8.3) 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 Fix the nits and you can add Acked-by: Josef Bacik Thanks, Josef