Whamcloud - gitweb
LU-8835 osc: handle 64 bit time properly in osc_cache_too_much 14/23814/5
authorJames Simmons <uja.ornl@yahoo.com>
Tue, 10 Jan 2017 22:40:40 +0000 (17:40 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 18 Jan 2017 18:59:31 +0000 (18:59 +0000)
commit11dfa318972db8c8d4bdc36848a4aee8072557f7
tree83697e9cd347a1eb8734cdc3c018f2cc71ad8a44
parent874690977923f9fa984f608e7bf1d6effda04e6b
LU-8835 osc: handle 64 bit time properly in osc_cache_too_much

Use 64 bit time for cl_lru_last_used and the function
osc_cache_too_much(). The use of 64 bit time will
introduce 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 we can perform a normal 32 bit
divison operation instead.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Change-Id: Ic38db2d22436fc2a8aa431562e4f5d22ec18d842
Reviewed-on: https://review.whamcloud.com/23814
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
lustre/include/obd.h
lustre/osc/osc_page.c