From owner-svn-src-user@FreeBSD.ORG Fri Nov 6 00:03:49 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0C4C1065672; Fri, 6 Nov 2009 00:03:49 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7615B8FC0A; Fri, 6 Nov 2009 00:03:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA603nx3095245; Fri, 6 Nov 2009 00:03:49 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA603n1V095242; Fri, 6 Nov 2009 00:03:49 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200911060003.nA603n1V095242@svn.freebsd.org> From: Kip Macy Date: Fri, 6 Nov 2009 00:03:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198966 - user/kmacy/releng_8_fcs_buf/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2009 00:03:49 -0000 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 #ifdef _KERNEL #include -#include #endif +#include #include #include #include @@ -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 }