diff options
author | Debabrata Banerjee <[email protected]> | 2017-02-26 20:32:13 -0500 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-05-02 15:47:23 -0400 |
commit | 9b50146dc444239112610284a0872310701289c4 (patch) | |
tree | eb0bf2f3fe4141c9c9e2a228b657bac1e31b04b3 /module/zfs/arc.c | |
parent | 2b91b5119c16539a074ae08e0998e2b527a976b4 (diff) |
Don't report ghost buffers as evictable mem
Ghost meta/data buffers are not actually allocated
AKAMAI: zfs: CR 3695072
Reviewed-by: Tim Chase <[email protected]>
Reviewed-by: Richard Yao <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Debabrata Banerjee <[email protected]>
Issue #6035
Diffstat (limited to 'module/zfs/arc.c')
-rw-r--r-- | module/zfs/arc.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/module/zfs/arc.c b/module/zfs/arc.c index 25fdbdd2b..4e5c9eaf5 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -4374,17 +4374,12 @@ arc_evictable_memory(void) 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_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); 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)); } /* |