Message ID | 170873668005.1860949.11612121203653366580.stgit@frogsfrogsfrogs |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-79394-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp932358dyb; Fri, 23 Feb 2024 17:11:45 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUsdg0GuIaj1/nz7N0Gr0+rWmczVG1je+dDyUb7pZbdE/e31Izb76td4XA6Xkki8PzRfS1OIsL9aq0YrnBpcHFws+Ia+Q== X-Google-Smtp-Source: AGHT+IF/oHxtw4Vsu2lgQBHgc765rsy/NINgh13p5xAULk2pPD7KHlYylpimQkxg42BF8lJ6W8Wf X-Received: by 2002:a05:6a20:9c97:b0:19e:a9c5:2ef6 with SMTP id mj23-20020a056a209c9700b0019ea9c52ef6mr2060788pzb.2.1708737105739; Fri, 23 Feb 2024 17:11:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708737105; cv=pass; d=google.com; s=arc-20160816; b=kal+iwu9ibN7HSRTWkbFw1biAZEI/q/XWVRvmeGf3q5GdFEmIUSbhjpqXCagj1Wbue 3M4qX3onUDm3wLX5tWvR9qXebFdrO1K21PzQcVAbXL/goAJwLnxdEBPs7hnfycwpOGx3 /hdT3h+hoCKN/KzYjW57u8/mkKLiHjQQ412AIMSDZN7Y7LHQQE5W5KYaOYwG8h44+pot 5hYMblOE1Jvcl35pDnUeNgvdl/KUwW6ONKByJgJyu1tRIGOqu9wZ6NsAmx8w51mw4faZ W+swdWO8a1gtJnzXc6/ZY1/thIq11nsfsvsVLjRiexwCvJ84PwFJahOUIcN/T1LtZIo5 21vQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:user-agent:references:in-reply-to :message-id:cc:to:from:subject:date:dkim-signature; bh=3zAaV7dajoF1cF7xSuk/g4HyRXAkxa1Y9GqQcL5xxL8=; fh=eGotrG2wUAPCtJbO4MhMKF1jcndrbQy7pSZLLDRnPjs=; b=MgJ4OiiFYm2V6cmo7nuRgPhSogJrBVaxrZRPDEkXK2BcQU3NQqUq1CvQCY/Q+p33BB k8lh4M+WpQhjHtDjUpe2tKgijn1WTHAyj6pEY0MdYgwgxQcDYyrQGeoGr8V9GwW++ph4 r44ie0OcPLXg1+10fkltw167DItDHzpz1vjHhgktWWqnZM1rTeijCO1Ke08/fnQ/o1sg bgLaEnlx13cd/kAmAp0GV9wreiZMtxd5aOCOxJiysyHuZtli/+0NbjM0urjmh4bmP0Ou u4Tnnq1W1EnIX5DDx9LSoASdkqNWINbItR0Rwl3ctulah0FhhVQNKcPYivOMhJvy81BX rC8A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Sw3MujSS; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79394-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79394-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id az9-20020a17090b028900b002993c279760si1928311pjb.71.2024.02.23.17.11.45 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 17:11:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79394-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Sw3MujSS; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79394-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79394-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 8AB9B281668 for <ouuuleilei@gmail.com>; Sat, 24 Feb 2024 01:11:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7936D5CB8; Sat, 24 Feb 2024 01:11:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Sw3MujSS" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D2DDC3C39; Sat, 24 Feb 2024 01:11:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708737068; cv=none; b=dPXd6djycwmomhyekfCSI3wWXXeOZvCSOaQv3s/jrK8kARH+GJhDjVL4tzRCp/GT/EdNhG7pQo2kTF58APiGY9j+nuYEFf3jKLkbT+/kfIRAskTVuX4i7b5MJEuenpyVaN54tk7RORWM7jLtUvvFdY/Puu9XDM3saiT0E5wjgl4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708737068; c=relaxed/simple; bh=G1a33vTP84d0+3QZ0jbrzf9wPqj/sGi8fNaIuQ1yvls=; h=Date:Subject:From:To:Cc:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=WInhHSii/bFXQFcruiAYapqHGK7daRnCaOcp5bljhk5keJMXVUtNcmkhgJj50rvZ2zrP1L/IQDhemOGPzIk67x11Y6n+C8HVt1C0RAFNbs6wMCv74KCTDbQShTNGVhfJfRkLvp0TLvso1/3sUEOSyMOtm+TzPCycZUWjfLcfleA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Sw3MujSS; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A8BBEC433F1; Sat, 24 Feb 2024 01:11:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708737068; bh=G1a33vTP84d0+3QZ0jbrzf9wPqj/sGi8fNaIuQ1yvls=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=Sw3MujSS2+6W5dVkxymiSSw4RXwbyxNk+O4NCLTO2/85DEFuKWTH8T84fqwUm5KjX fqleHvatvbRHsXuncO9auONelk2kj50dc340mVjDycRCDj7TrcLnXJgpBPABkUOoQ2 q30HcEIPOuFJ6SxDX2xHp4vRYZYmjrxFOVu6x5eP95VpgHWb0ImHoNWIqUOOC6mVuf 8pEYoDKefGdl+i1fbY6YrtcgA+nuiMPO3N97vEbjRQiYtEx/KozcWU80YcGtn/v9vl Ii9jfdvMpgg9LzK66BkygmmcH4IuoxKHSPJKnFy2Sq/CHWTIAbfIpwLVX7+VMA1UZM +CrbNZOZW8GLg== Date: Fri, 23 Feb 2024 17:11:08 -0800 Subject: [PATCH 04/10] time_stats: add larger units From: "Darrick J. Wong" <djwong@kernel.org> To: akpm@linux-foundation.org, daniel@gluo.nz, kent.overstreet@linux.dev, djwong@kernel.org Cc: linux-xfs@vger.kernel.org, linux-bcachefs@vger.kernel.org, linux-kernel@vger.kernel.org Message-ID: <170873668005.1860949.11612121203653366580.stgit@frogsfrogsfrogs> In-Reply-To: <170873667916.1860949.11027844260383646446.stgit@frogsfrogsfrogs> References: <170873667916.1860949.11027844260383646446.stgit@frogsfrogsfrogs> User-Agent: StGit/0.19 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791740719226724321 X-GMAIL-MSGID: 1791740719226724321 |
Series |
[01/10] time_stats: report lifetime of the stats object
|
|
Commit Message
Darrick J. Wong
Feb. 24, 2024, 1:11 a.m. UTC
From: Darrick J. Wong <djwong@kernel.org> Filesystems can stay mounted for a very long time, so add some larger units. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> --- lib/time_stats.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/lib/time_stats.c b/lib/time_stats.c index 767b1a340e805..43106bda43a92 100644 --- a/lib/time_stats.c +++ b/lib/time_stats.c @@ -16,6 +16,9 @@ static const struct time_unit time_units[] = { { "s", NSEC_PER_SEC }, { "m", (u64) NSEC_PER_SEC * 60}, { "h", (u64) NSEC_PER_SEC * 3600}, + { "d", (u64) NSEC_PER_SEC * 3600 * 24}, + { "w", (u64) NSEC_PER_SEC * 3600 * 24 * 7}, + { "y", (u64) NSEC_PER_SEC * ((3600 * 24 * 7 * 365) + (3600 * (24 / 4) * 7))}, /* 365.25d */ { "eon", U64_MAX }, };