mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 11:18:52 +03:00
Use ddi_time_after and friends to compare time
Also, make sure we use clock_t for ddi_get_lbolt to prevent type conversion from screwing things. Signed-off-by: Chunwei Chen <tuxoko@gmail.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #2142
This commit is contained in:
committed by
Brian Behlendorf
parent
888f7141a3
commit
0b75bdb369
+3
-2
@@ -2480,7 +2480,8 @@ arc_adapt_thread(void)
|
||||
#endif /* !_KERNEL */
|
||||
|
||||
/* No recent memory pressure allow the ARC to grow. */
|
||||
if (arc_no_grow && ddi_get_lbolt() >= arc_grow_time)
|
||||
if (arc_no_grow &&
|
||||
ddi_time_after_eq(ddi_get_lbolt(), arc_grow_time))
|
||||
arc_no_grow = FALSE;
|
||||
|
||||
arc_adjust_meta();
|
||||
@@ -2918,7 +2919,7 @@ arc_access(arc_buf_hdr_t *buf, kmutex_t *hash_lock)
|
||||
* but it is still in the cache. Move it to the MFU
|
||||
* state.
|
||||
*/
|
||||
if (now > buf->b_arc_access + ARC_MINTIME) {
|
||||
if (ddi_time_after(now, buf->b_arc_access + ARC_MINTIME)) {
|
||||
/*
|
||||
* More than 125ms have passed since we
|
||||
* instantiated this buffer. Move it to the
|
||||
|
||||
Reference in New Issue
Block a user