mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-27 03:19:35 +03:00
Don't report ghost buffers as evictable mem
Ghost meta/data buffers are not actually allocated AKAMAI: zfs: CR 3695072 Reviewed-by: Tim Chase <tim@chase2k.com> Reviewed-by: Richard Yao <ryao@gentoo.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Debabrata Banerjee <dbanerje@akamai.com> Issue #6035
This commit is contained in:
parent
2b91b5119c
commit
9b50146dc4
@ -4374,17 +4374,12 @@ arc_evictable_memory(void)
|
|||||||
refcount_count(&arc_mru->arcs_esize[ARC_BUFC_METADATA]) +
|
refcount_count(&arc_mru->arcs_esize[ARC_BUFC_METADATA]) +
|
||||||
refcount_count(&arc_mfu->arcs_esize[ARC_BUFC_DATA]) +
|
refcount_count(&arc_mfu->arcs_esize[ARC_BUFC_DATA]) +
|
||||||
refcount_count(&arc_mfu->arcs_esize[ARC_BUFC_METADATA]);
|
refcount_count(&arc_mfu->arcs_esize[ARC_BUFC_METADATA]);
|
||||||
uint64_t ghost_clean =
|
|
||||||
refcount_count(&arc_mru_ghost->arcs_esize[ARC_BUFC_DATA]) +
|
|
||||||
refcount_count(&arc_mru_ghost->arcs_esize[ARC_BUFC_METADATA]) +
|
|
||||||
refcount_count(&arc_mfu_ghost->arcs_esize[ARC_BUFC_DATA]) +
|
|
||||||
refcount_count(&arc_mfu_ghost->arcs_esize[ARC_BUFC_METADATA]);
|
|
||||||
uint64_t arc_dirty = MAX((int64_t)arc_size - (int64_t)arc_clean, 0);
|
uint64_t arc_dirty = MAX((int64_t)arc_size - (int64_t)arc_clean, 0);
|
||||||
|
|
||||||
if (arc_dirty >= arc_c_min)
|
if (arc_dirty >= arc_c_min)
|
||||||
return (ghost_clean + arc_clean);
|
return (arc_clean);
|
||||||
|
|
||||||
return (ghost_clean + MAX((int64_t)arc_size - (int64_t)arc_c_min, 0));
|
return (MAX((int64_t)arc_size - (int64_t)arc_c_min, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user