From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Martin K. Petersen" Subject: Re: [PATCH] scsi: libfc: fix seconds_since_last_reset calculation Date: Mon, 20 Jun 2016 22:05:24 -0400 Message-ID: References: <20160617154737.633440-1-arnd@arndb.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <20160617154737.633440-1-arnd@arndb.de> (Arnd Bergmann's message of "Fri, 17 Jun 2016 17:47:25 +0200") Sender: linux-kernel-owner@vger.kernel.org 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 List-Id: linux-scsi@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