Date: Fri, 6 Nov 2009 00:03:49 +0000 (UTC) From: Kip Macy <kmacy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r198966 - user/kmacy/releng_8_fcs_buf/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <200911060003.nA603n1V095242@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kmacy Date: Fri Nov 6 00:03:48 2009 New Revision: 198966 URL: http://svn.freebsd.org/changeset/base/198966 Log: fix kmem_alloc flag usage and arc_evict accounting bug Modified: user/kmacy/releng_8_fcs_buf/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c user/kmacy/releng_8_fcs_buf/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Modified: user/kmacy/releng_8_fcs_buf/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- user/kmacy/releng_8_fcs_buf/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Nov 6 00:00:47 2009 (r198965) +++ user/kmacy/releng_8_fcs_buf/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Nov 6 00:03:48 2009 (r198966) @@ -126,8 +126,8 @@ #include <sys/vdev.h> #ifdef _KERNEL #include <sys/dnlc.h> -#include <sys/ktr.h> #endif +#include <sys/ktr.h> #include <sys/callb.h> #include <sys/kstat.h> #include <sys/sdt.h> @@ -1708,14 +1708,13 @@ arc_evict(arc_state_t *state, spa_t *spa boolean_t have_lock; struct buf *stolen = NULL; static int evict_metadata_offset, evict_data_offset; - int idx, offset, list_count, count; + int i, idx, offset, list_count, count; ASSERT(state == arc_mru || state == arc_mfu); ASSERT(recycle == FALSE); evicted_state = (state == arc_mru) ? arc_mru_ghost : arc_mfu_ghost; - bytes_remaining = evicted_state->arcs_lsize[ab->b_type]; if (type == ARC_BUFC_METADATA) { offset = 0; list_count = ARC_BUFC_NUMMETADATALISTS; @@ -1730,6 +1729,9 @@ arc_evict(arc_state_t *state, spa_t *spa list_count = ARC_BUFC_NUMDATALISTS; idx = evict_data_offset; } + for (bytes_remaining = 0, i = 0; i < list_count; i++) + bytes_remaining += evicted_state->arcs_lsize[i + offset]; + count = 0; evict_start: Modified: user/kmacy/releng_8_fcs_buf/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- user/kmacy/releng_8_fcs_buf/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Fri Nov 6 00:00:47 2009 (r198965) +++ user/kmacy/releng_8_fcs_buf/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Fri Nov 6 00:03:48 2009 (r198966) @@ -214,7 +214,7 @@ zio_data_buf_alloc(size_t size) return (kmem_cache_alloc(zio_data_buf_cache[c], KM_PUSHPAGE)); #else - return (kmem_alloc(size, KM_SLEEP|KM_NODEBUG)); + return (kmem_alloc(size, KM_SLEEP)); #endif }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911060003.nA603n1V095242>