Revert "Allow arc_evict_ghost() to only evict meta data"
Illumos 5497 "lock contention on arcs_mtx" reworks eviction and obviates the need for this. Signed-off-by: Tim Chase <tim@chase2k.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
parent
f6b3b1f5d6
commit
97639d0a52
|
@ -498,8 +498,7 @@ static arc_buf_hdr_t arc_eviction_hdr;
|
|||
static void arc_get_data_buf(arc_buf_t *buf);
|
||||
static void arc_access(arc_buf_hdr_t *buf, kmutex_t *hash_lock);
|
||||
static int arc_evict_needed(arc_buf_contents_t type);
|
||||
static void arc_evict_ghost(arc_state_t *state, uint64_t spa, int64_t bytes,
|
||||
arc_buf_contents_t type);
|
||||
static void arc_evict_ghost(arc_state_t *state, uint64_t spa, int64_t bytes);
|
||||
static void arc_buf_watch(arc_buf_t *buf);
|
||||
|
||||
static boolean_t l2arc_write_eligible(uint64_t spa_guid, arc_buf_hdr_t *ab);
|
||||
|
@ -1945,7 +1944,6 @@ top:
|
|||
* that evicting from the ghost list in this hot code path, leave
|
||||
* this chore to the arc_reclaim_thread().
|
||||
*/
|
||||
|
||||
return (stolen);
|
||||
}
|
||||
|
||||
|
@ -1954,12 +1952,11 @@ top:
|
|||
* bytes. Destroy the buffers that are removed.
|
||||
*/
|
||||
static void
|
||||
arc_evict_ghost(arc_state_t *state, uint64_t spa, int64_t bytes,
|
||||
arc_buf_contents_t type)
|
||||
arc_evict_ghost(arc_state_t *state, uint64_t spa, int64_t bytes)
|
||||
{
|
||||
arc_buf_hdr_t *ab, *ab_prev;
|
||||
arc_buf_hdr_t marker;
|
||||
list_t *list = &state->arcs_list[type];
|
||||
list_t *list = &state->arcs_list[ARC_BUFC_DATA];
|
||||
kmutex_t *hash_lock;
|
||||
uint64_t bytes_deleted = 0;
|
||||
uint64_t bufs_skipped = 0;
|
||||
|
@ -2094,7 +2091,7 @@ arc_adjust(void)
|
|||
|
||||
if (adjustment > 0 && arc_mru_ghost->arcs_size > 0) {
|
||||
delta = MIN(arc_mru_ghost->arcs_size, adjustment);
|
||||
arc_evict_ghost(arc_mru_ghost, 0, delta, ARC_BUFC_DATA);
|
||||
arc_evict_ghost(arc_mru_ghost, 0, delta);
|
||||
}
|
||||
|
||||
adjustment =
|
||||
|
@ -2102,7 +2099,7 @@ arc_adjust(void)
|
|||
|
||||
if (adjustment > 0 && arc_mfu_ghost->arcs_size > 0) {
|
||||
delta = MIN(arc_mfu_ghost->arcs_size, adjustment);
|
||||
arc_evict_ghost(arc_mfu_ghost, 0, delta, ARC_BUFC_DATA);
|
||||
arc_evict_ghost(arc_mfu_ghost, 0, delta);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2231,15 +2228,14 @@ restart:
|
|||
|
||||
if (adjustmnt > 0 && arc_mru_ghost->arcs_lsize[type] > 0) {
|
||||
delta = MIN(adjustmnt,
|
||||
arc_mru_ghost->arcs_lsize[type]);
|
||||
arc_evict_ghost(arc_mru_ghost, 0, delta, type);
|
||||
adjustmnt -= delta;
|
||||
arc_mru_ghost->arcs_lsize[ARC_BUFC_METADATA]);
|
||||
arc_evict_ghost(arc_mru_ghost, 0, delta);
|
||||
}
|
||||
|
||||
if (adjustmnt > 0 && arc_mfu_ghost->arcs_lsize[type] > 0) {
|
||||
delta = MIN(adjustmnt,
|
||||
arc_mfu_ghost->arcs_lsize[type]);
|
||||
arc_evict_ghost(arc_mfu_ghost, 0, delta, type);
|
||||
arc_mfu_ghost->arcs_lsize[ARC_BUFC_METADATA]);
|
||||
arc_evict_ghost(arc_mfu_ghost, 0, delta);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2301,8 +2297,8 @@ arc_flush(spa_t *spa)
|
|||
break;
|
||||
}
|
||||
|
||||
arc_evict_ghost(arc_mru_ghost, guid, -1, ARC_BUFC_DATA);
|
||||
arc_evict_ghost(arc_mfu_ghost, guid, -1, ARC_BUFC_DATA);
|
||||
arc_evict_ghost(arc_mru_ghost, guid, -1);
|
||||
arc_evict_ghost(arc_mfu_ghost, guid, -1);
|
||||
|
||||
mutex_enter(&arc_reclaim_thr_lock);
|
||||
arc_do_user_evicts();
|
||||
|
|
Loading…
Reference in New Issue