Mercurial > illumos > illumos-gate
changeset 3718:a7973eff65f3
6528274 arc_reclaim_needed's zio code has a pair of incorrect assumptions
author | johansen |
---|---|
date | Mon, 26 Feb 2007 14:11:03 -0800 |
parents | 8471164f3e47 |
children | 0a19a978a89c |
files | usr/src/uts/common/fs/zfs/arc.c |
diffstat | 1 files changed, 5 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/fs/zfs/arc.c Mon Feb 26 14:04:25 2007 -0800 +++ b/usr/src/uts/common/fs/zfs/arc.c Mon Feb 26 14:11:03 2007 -0800 @@ -368,7 +368,6 @@ static arc_buf_t *arc_eviction_list; static kmutex_t arc_eviction_mtx; static arc_buf_hdr_t arc_eviction_hdr; -static size_t arc_ziosize; static void arc_get_data_buf(arc_buf_t *buf); static void arc_access(arc_buf_hdr_t *buf, kmutex_t *hash_lock); @@ -1418,9 +1417,12 @@ * physical memory. */ if (zio_arena != NULL) { - if ((btop(physmem) > arc_ziosize) && + size_t arc_ziosize = + btop(vmem_size(zio_arena, VMEM_FREE | VMEM_ALLOC)); + + if ((physmem > arc_ziosize) && (btop(vmem_size(zio_arena, VMEM_FREE)) < arc_ziosize >> 2)) - return (1); + return (1); } #if defined(__i386) @@ -2747,12 +2749,6 @@ TS_RUN, minclsyspri); arc_dead = FALSE; - -#ifdef _KERNEL - if (zio_arena != NULL) - arc_ziosize = - btop(vmem_size(zio_arena, VMEM_FREE | VMEM_ALLOC)); -#endif /* _KERNEL */ } void