lkml.org 
[lkml]   [2016]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] scsi: libfc: fix seconds_since_last_reset calculation
From
Date
>>>>> "Arnd" == Arnd Bergmann <arnd@arndb.de> 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

\
 
 \ /
  Last update: 2016-06-21 04:41    [W:0.072 / U:1.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site