Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1040261imm; Wed, 1 Aug 2018 09:13:05 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcFQWlnwA7Dpn3ivC53Kjkw9BHiii2A7TDJA/nUk3PZCH3wM73aZqr1Iy3OjolhhRs7U+8t X-Received: by 2002:a62:25c5:: with SMTP id l188-v6mr27236463pfl.179.1533139985057; Wed, 01 Aug 2018 09:13:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533139985; cv=none; d=google.com; s=arc-20160816; b=obDp1gqXGg/ozUz+uD2k8zOX+0Y1echaciygUBZHG0hx5upWcQHKvScbevk2TWLLpv Y2aeQ/S9FYw5AVol2AweK0Dl9RJ7RNFx0HDbWS1+4v+pbb5EKgeJIGTFY4AS7dCpGU2l 3CfC1qme4m/NsQPJ1R8FfuBrtiDSuHbPArL+50PmKxkQCSUUf59d18IG4j1Ql4iF8od0 dnSuc4g5GeWsgbXOXi64ZBcMOc56cl828kPjGV66OSZ10A75+02/y/A7wxEIHOLgq5tH R8pocmcU76XrHJUiJgNd7N76/DEx+IRbpbwvJRVjHp53H/RtiWfRCUfc4kkNuEsXrXja 4Mpw== 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=BTWBEwriMB4IM8RCCcf1tcZMNxuqeP2Zcup7vIWFOA0=; b=WJR1bainsQvDB7UByPx0e9ArlQVOunfMGDRMbHyzEg8SWf9y6j59zXoxxp13YtLToF 2glUnBPvJBPoOSCddk6VGUgQh5SggJJSKBCag1UQlPLppQw0yRgMb37c+imUM4vNWftz 9wgKXUtcFsFWU6SI/KuUtJzYnPxqxeUz4oS/ztvuc8Nm/edimKEXW6Rz9Uknwb1hoyoQ sbJzfGXPcMG5A5ruFt+bWtDUEaHNALdJvphwc6VLC1eevzisLfmNlGyNJBd0n7YLtLCK 9wRzjBqrwVPps4O9zXjdxN2Ni7lO5q4qvW7mvjlGdxiboFjwGSrbV3AUStK4R2qnIBbE ltRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=gY7fkdFT; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j6-v6si10086642plk.438.2018.08.01.09.12.50; Wed, 01 Aug 2018 09:13:05 -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=fail header.i=@gmail.com header.s=20161025 header.b=gY7fkdFT; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390084AbeHAR4k (ORCPT + 99 others); Wed, 1 Aug 2018 13:56:40 -0400 Received: from mail-yb0-f195.google.com ([209.85.213.195]:36625 "EHLO mail-yb0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390031AbeHAR4j (ORCPT ); Wed, 1 Aug 2018 13:56:39 -0400 Received: by mail-yb0-f195.google.com with SMTP id s1-v6so7742398ybk.3; Wed, 01 Aug 2018 09:10:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=BTWBEwriMB4IM8RCCcf1tcZMNxuqeP2Zcup7vIWFOA0=; b=gY7fkdFTgl0huYzwe1SuzAu8zXMhSeUp1Etgw1OstWg1iAAC3jYA/dNPBpQNlAkj+2 744dOjq1I4gJtqcyDboRg5fGphWXDP5iq5Zv41GgROFgi2HxmA8S7LhgZZQvM86AImJv 5q5fWlvv0Bk05KdCBT+pLOqzgIYc+MK+DXo8YXSH47kkBTTNiVGaXe1uaEu8hpeov/Qm pE2DGUrbM9hoQ8MsMmgNqzvxRFoAWmwxE4ZYTvYPAEaCdrb8Ztez204Hlmyp/tPllabz v2B6f7RxwXcAOB6rZ/W1R9RqnUvC+SWSOSc+BuOlOs149w4od58LphJ94Rb/395sNlpI CIoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=BTWBEwriMB4IM8RCCcf1tcZMNxuqeP2Zcup7vIWFOA0=; b=IyDP2jYDaZ/H9BY/RqDGYdezH+dFdc4jb2sBnLYu2GiIy29+SNllTbHOmQPm1RuoMy 0TSpshWIokWAT5XLnVo9vQ9OAqpgdNqJm80n8N3h4hLZ0TJa7OeSbBp+QOKHor9OQN7A 4+UjAy8UWAvmDU6CSI7CE5PrGwmj2nIPe3I5j6lU3XQ0c9ZosDHL9xRZFqnYylLOfw25 FEPnudCZDrjjp/xcpZbCuQ7zmZGfho+/pUOC9rIB6YoAcvIwM04WQz9hfJPz1YdO1HIE 4BCoJzv5CxDgnMW68kC8nPUrkWm+NFKRUI1LsBLUrQxreWTKLx5PdAQPz8pSLRnhS01A cCjQ== X-Gm-Message-State: AOUpUlFVCfJ1TnDQlTX6J79oERgU4gPpis5ZPewdUbOH5/vGES0sRree HFIq0IpOWqWVsV1G/bYNrQx7Ye3T X-Received: by 2002:a5b:2c7:: with SMTP id h7-v6mr14015369ybp.190.1533139813812; Wed, 01 Aug 2018 09:10:13 -0700 (PDT) Received: from localhost ([2620:10d:c091:200::2:d2a6]) by smtp.gmail.com with ESMTPSA id i67-v6sm19608981ywc.27.2018.08.01.09.10.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Aug 2018 09:10:12 -0700 (PDT) Date: Wed, 1 Aug 2018 09:10:11 -0700 From: Tejun Heo To: Dennis Zhou Cc: 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: <20180801161011.GS1206094@devbig004.ftw2.facebook.com> References: <20180801002559.36261-1-dennisszhou@gmail.com> <20180801154958.GP1206094@devbig004.ftw2.facebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180801154958.GP1206094@devbig004.ftw2.facebook.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 01, 2018 at 08:49:58AM -0700, Tejun Heo wrote: > Hello, > > On Tue, Jul 31, 2018 at 05:25:59PM -0700, Dennis Zhou wrote: > ... > > + /* > > + * CALC_LOAD takes in a number stored in fixed point representation. > > + * Because we are using this for IO time in ns, the values stored > > + * are significantly larger than the FIXED_1 denominator (2048). > > + * Therefore, rounding errors in the calculation are negligible and > > + * can be ignored. > > + */ > > + exp_idx = min_t(int, BLKIOLATENCY_NR_EXP_FACTORS - 1, > > + iolat->cur_win_nsec / BLKIOLATENCY_EXP_BUCKET_SIZE); > > Build bot is complaining about naked 64bit div. Should use one of the > div64*() helpers. > > Looks good to me. Once Johannes's concerns are addressed, please feel > free to add Ooh, one nitpick. total_lat_avg is a bit of a misnomer now. Maybe rename to lat_avg? Thanks. -- tejun