]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
staging: lustre: osc: avoid 64 divide in osc_cache_too_much
authorJames Simmons <jsimmons@infradead.org>
Sun, 29 Jan 2017 00:05:26 +0000 (19:05 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Feb 2017 12:01:38 +0000 (13:01 +0100)
commit86df59846c924c2339603f4370779581e594d0e1
treeee50820d4fae30b47639e0cf0ddb922cc36b37a1
parent1cf96da241f489fd29fe564c8fc045e51b5269b8
staging: lustre: osc: avoid 64 divide in osc_cache_too_much

The use of 64 bit time introduces an expensive 64 bit
division operation. Since the time lapse being calculated
in osc_cache_too_much will never be more than seventy years
we can cast the time lapse to an long and perform a normal
32 bit divison operation instead.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8835
Reviewed-on: https://review.whamcloud.com/23814
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/osc/osc_page.c