diff options
author | Josh Paetzel <jpaetzel@FreeBSD.org> | 2017-02-17 15:00:13 +0000 |
---|---|---|
committer | Josh Paetzel <jpaetzel@FreeBSD.org> | 2017-02-17 15:00:13 +0000 |
commit | 91c038e77a05b9baf3048510b0dda424955dcc36 (patch) | |
tree | 7076a732a173f61f87dddbaf6446f35cf7771cc8 | |
parent | 281825cdf18573222190e6aa7d81e739fe2bb0bc (diff) |
Notes
-rw-r--r-- | uts/common/fs/zfs/arc.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/uts/common/fs/zfs/arc.c b/uts/common/fs/zfs/arc.c index ef8482bacf86..1afb4889a8b0 100644 --- a/uts/common/fs/zfs/arc.c +++ b/uts/common/fs/zfs/arc.c @@ -3748,7 +3748,6 @@ arc_reclaim_thread(void) mutex_enter(&arc_reclaim_lock); while (!arc_reclaim_thread_exit) { - int64_t free_memory = arc_available_memory(); uint64_t evicted = 0; /* @@ -3767,6 +3766,14 @@ arc_reclaim_thread(void) mutex_exit(&arc_reclaim_lock); + /* + * We call arc_adjust() before (possibly) calling + * arc_kmem_reap_now(), so that we can wake up + * arc_get_data_buf() sooner. + */ + evicted = arc_adjust(); + + int64_t free_memory = arc_available_memory(); if (free_memory < 0) { arc_no_grow = B_TRUE; @@ -3800,8 +3807,6 @@ arc_reclaim_thread(void) arc_no_grow = B_FALSE; } - evicted = arc_adjust(); - mutex_enter(&arc_reclaim_lock); /* |