Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1961547pxk; Tue, 1 Sep 2020 11:57:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCg9KrlGVDXgFw+MpcVAVbLowcsxxz0Y887ZFDqPp0XA3HUwXQZvs0KScBFJ6bf1+WCYG3 X-Received: by 2002:a17:906:2b4f:: with SMTP id b15mr3001412ejg.477.1598986673249; Tue, 01 Sep 2020 11:57:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598986673; cv=none; d=google.com; s=arc-20160816; b=MbJoZGOb3Q04K7o2npLsa1bCOYc2cufo5ZGT/jv7f7dSVVMsACTOUOyTXyN4Fc5FIa NlK7NigruQ7UK42zSZczXtBOytuSf8CxZ2ajh6oD+JRTKo+4QMIpywPRgSRAhIEjQrdW ZCI47lVyw2GygvMYCNpXGD6TDqCB7mlmJHDTZ81azt+ck7kJ0l+/EKzSmptBeobD0MU7 MUFSLtRaPNz0wUpanzRrUI4yWJFc6uHlkjoOfcFLGbp+zcBoXHqYM/t50ZO2oE0nNKfR H2rIfD3J6EUWhBgmAmLOwd1Jrmy7ZJKBw1f0pRitOm5tObcp/FS8D7Hz8j7s+0S1MvmK MiRQ== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=kkFoDBzJXtohjGExUSaDt/SZfRBA8OsFvyf57BiJvyg=; b=Xw4R35kqogMQDg1/vvEF6uAKERD2EI3m3sW3sT3hNotj7VN6XXM/jYLwMWpGmxoDpH h5040GB+nUbma894SiRawuEPUI2eNetXh3Eq+5J/1cv0CsA588shuJKUoT07B0bi0jdp LjiYM+t4GEq+F5/QSyW7wqis7RzW4LuCr+2IVdWzh9TITFb8zkWBwSpmOCiiGKO25JnA iBNuWP/zlTsmdK38fQ1EQzrLhzVH7VIzLO52Mqs8fAghLYknoGGkFGSaT23XPK9ePrFR jeJ3A/mVM/umQ3MJEubZWFOwKD7TBKSUGXRSD0M2D+f3X8q0HD3L/yc5S8usO/TTm1PO eCBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="cxg/UxVA"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u16si1287764ejr.4.2020.09.01.11.57.29; Tue, 01 Sep 2020 11:57:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="cxg/UxVA"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732591AbgIAS4O (ORCPT + 99 others); Tue, 1 Sep 2020 14:56:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731567AbgIASxh (ORCPT ); Tue, 1 Sep 2020 14:53:37 -0400 Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74D4CC061246; Tue, 1 Sep 2020 11:53:36 -0700 (PDT) Received: by mail-qt1-x843.google.com with SMTP id z2so1731881qtv.12; Tue, 01 Sep 2020 11:53:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kkFoDBzJXtohjGExUSaDt/SZfRBA8OsFvyf57BiJvyg=; b=cxg/UxVAB6yQXR3TZQm4h8sbyRVSYu+uhDSfcqkgpdnlD21RHugcINxXFcSRleiXJv eASQJsFp8YoQy2bNQEPjflIStjRBqT3xMzOBW+SCvqxeBqAQrYVBmJZbAcLEBn+xgZI/ Q6vKOOK7PQsxfBPW/sgPXQ3gNtTxzElyrcOyhvQZbRmdhcIJqSKuOoltun0aP4ks/Aa9 mP/EJrsPFqyNQuKWojEvF5Dlzic6YjUQzAg0apY1Q/bTV/X8Xv91XuKOqqYhrmEiNJId 1OfDuY2UKMrOf0xGcPrE//vyBzVtl0l3eaIcmVJR21ld44TE7ZAYR+TWA5PTE5FqoyuX ziTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=kkFoDBzJXtohjGExUSaDt/SZfRBA8OsFvyf57BiJvyg=; b=fJjzxBW+wBxW3qqGprZDRiEntaRuaUu0+L91/jIgd+g/Xc9ZW1u4HqmWhqWel8HFbS nLECk+tnfk97OGqZZpEem4V/Svfq1SOgoQi3ewcKXDGHCGHS++2C3yMYiB7+eFmZnL0N yZjFaHE2IyxW1q5xm9cWKoZAP6sZ9gdGbyz0PJf7mR9l9ESUPIcEtXcdt96TBPpv1xCx 5Y4idY4Z7qqv5PN3qepUpuFV8bDeiRr4HfPnJZejhQx+kqoV8k4Nnfqey8pCKssQqr5N i8ZumX4Ao9KZX/c69lbvvnrFXEchMJ0e06NsiV75NW4yAVTf/Pgg/QFnzCmDfzcnKM9f XWkg== X-Gm-Message-State: AOAM532LfUW4+46ZFIOvY6Nq0D+peExUOYGPR7K3nnZbsw1F3+clqolE OvW33FGv5WFG3XKCgvOM5W8= X-Received: by 2002:ac8:4e2f:: with SMTP id d15mr3261767qtw.20.1598986415568; Tue, 01 Sep 2020 11:53:35 -0700 (PDT) Received: from localhost ([2620:10d:c091:480::1:a198]) by smtp.gmail.com with ESMTPSA id j74sm2679768qke.7.2020.09.01.11.53.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2020 11:53:35 -0700 (PDT) From: Tejun Heo To: axboe@kernel.dk Cc: linux-block@vger.kernel.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com, newella@fb.com, Tejun Heo Subject: [PATCH 10/27] blk-iocost: make ioc_now->now and ioc->period_at 64bit Date: Tue, 1 Sep 2020 14:52:40 -0400 Message-Id: <20200901185257.645114-11-tj@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200901185257.645114-1-tj@kernel.org> References: <20200901185257.645114-1-tj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org They are in microseconds and wrap in around 1.2 hours with u32. While unlikely, confusions from wraparounds are still possible. We aren't saving anything meaningful by keeping these u32. Let's make them u64. Signed-off-by: Tejun Heo --- block/blk-iocost.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/blk-iocost.c b/block/blk-iocost.c index 00c5a3ad2b5b..dc72cd965837 100644 --- a/block/blk-iocost.c +++ b/block/blk-iocost.c @@ -409,7 +409,7 @@ struct ioc { atomic64_t vtime_rate; seqcount_spinlock_t period_seqcount; - u32 period_at; /* wallclock starttime */ + u64 period_at; /* wallclock starttime */ u64 period_at_vtime; /* vtime starttime */ atomic64_t cur_period; /* inc'd each period */ @@ -508,7 +508,7 @@ struct ioc_cgrp { struct ioc_now { u64 now_ns; - u32 now; + u64 now; u64 vnow; u64 vrate; }; -- 2.26.2