Re: [PATCH] scsi: libfc: fix seconds_since_last_reset calculation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>>>> "Arnd" == Arnd Bergmann <arnd@xxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux