OpenZFS 7504 - kmem_reap hangs spa_sync and administrative tasks
Authored by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Prakash Surya <prakash.surya@delphix.com> Approved by: Dan McDonald <danmcd@omniti.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tim Chase <tim@chase2k.com> Ported-by: George Melikov <mail@gmelikov.ru> OpenZFS-issue: https://www.illumos.org/issues/7504 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/405a5a0 Closes #5736
This commit is contained in:
parent
2e0e443ac4
commit
0a252daed3
|
@ -4193,7 +4193,6 @@ arc_reclaim_thread(void)
|
||||||
mutex_enter(&arc_reclaim_lock);
|
mutex_enter(&arc_reclaim_lock);
|
||||||
while (!arc_reclaim_thread_exit) {
|
while (!arc_reclaim_thread_exit) {
|
||||||
int64_t to_free;
|
int64_t to_free;
|
||||||
int64_t free_memory = arc_available_memory();
|
|
||||||
uint64_t evicted = 0;
|
uint64_t evicted = 0;
|
||||||
|
|
||||||
arc_tuning_update();
|
arc_tuning_update();
|
||||||
|
@ -4215,6 +4214,14 @@ arc_reclaim_thread(void)
|
||||||
#endif
|
#endif
|
||||||
mutex_exit(&arc_reclaim_lock);
|
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) {
|
if (free_memory < 0) {
|
||||||
|
|
||||||
arc_no_grow = B_TRUE;
|
arc_no_grow = B_TRUE;
|
||||||
|
@ -4247,8 +4254,6 @@ arc_reclaim_thread(void)
|
||||||
arc_no_grow = B_FALSE;
|
arc_no_grow = B_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
evicted = arc_adjust();
|
|
||||||
|
|
||||||
mutex_enter(&arc_reclaim_lock);
|
mutex_enter(&arc_reclaim_lock);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue