From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932217AbcFUCFm (ORCPT ); Mon, 20 Jun 2016 22:05:42 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:36059 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932077AbcFUCFi (ORCPT ); Mon, 20 Jun 2016 22:05:38 -0400 To: Arnd Bergmann Cc: Vasu Dev , "James E.J. Bottomley" , "Martin K. Petersen" , y2038@lists.linaro.org, fcoe-devel@open-fcoe.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] scsi: libfc: fix seconds_since_last_reset calculation From: "Martin K. Petersen" Organization: Oracle Corporation References: <20160617154737.633440-1-arnd@arndb.de> Date: Mon, 20 Jun 2016 22:05:24 -0400 In-Reply-To: <20160617154737.633440-1-arnd@arndb.de> (Arnd Bergmann's message of "Fri, 17 Jun 2016 17:47:25 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>>>> "Arnd" == Arnd Bergmann writes: Arnd> The fc_get_host_stats() function contains a complex conversion Arnd> from jiffies to timespec to seconds. As we try to get rid of uses Arnd> of struct timespec, we can clean this up and replace it with a Arnd> simpler computation. Arnd> Simply dividing the difference in jiffies by HZ is not only much Arnd> more efficient, it also avoids a problem that causes the Arnd> seconds_since_last_reset value to be incorrect if jiffies has Arnd> overrun since the 'boot_time' value was recorded. Applied to 4.8/scsi-queue. -- Martin K. Petersen Oracle Linux Engineering