diff options
| author | Matthew Ahrens <mahrens@delphix.com> | 2016-11-05 20:54:02 -0700 |
|---|---|---|
| committer | Matthew Ahrens <mahrens@delphix.com> | 2016-11-07 08:54:54 -0800 |
| commit | 405a5a0f5c3ab36cb76559467d1a62ba648bd809 (patch) | |
| tree | e1d9b332fede00b2346b74ffc38606968a414cf4 /usr/src | |
| parent | 3c5da275f68706f8301ea6c616a098430d84a71a (diff) | |
| download | illumos-joyent-405a5a0f5c3ab36cb76559467d1a62ba648bd809.tar.gz | |
7504 kmem_reap hangs spa_sync and administrative tasks
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Diffstat (limited to 'usr/src')
| -rw-r--r-- | usr/src/uts/common/fs/zfs/arc.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/usr/src/uts/common/fs/zfs/arc.c b/usr/src/uts/common/fs/zfs/arc.c index 0dd1d480cd..e876ad00fa 100644 --- a/usr/src/uts/common/fs/zfs/arc.c +++ b/usr/src/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); /* |
