From owner-svn-src-head@FreeBSD.ORG Sat Oct 4 14:45:05 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F35BFF8B; Sat, 4 Oct 2014 14:45:04 +0000 (UTC) Received: from smtp1.multiplay.co.uk (smtp1.multiplay.co.uk [85.236.96.35]) by mx1.freebsd.org (Postfix) with ESMTP id 65FE4BDA; Sat, 4 Oct 2014 14:45:04 +0000 (UTC) Received: by smtp1.multiplay.co.uk (Postfix, from userid 65534) id 6376620E7089B; Sat, 4 Oct 2014 14:45:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.multiplay.co.uk X-Spam-Level: * X-Spam-Status: No, score=2.0 required=8.0 tests=AWL,BAYES_00,DOS_OE_TO_MX, FSL_HELO_NON_FQDN_1,RDNS_DYNAMIC autolearn=no version=3.3.1 Received: from r2d2 (82-69-141-170.dsl.in-addr.zen.co.uk [82.69.141.170]) by smtp1.multiplay.co.uk (Postfix) with ESMTPS id C4CDD20E70899; Sat, 4 Oct 2014 14:45:00 +0000 (UTC) Message-ID: From: "Steven Hartland" To: "Ian Lepore" , "Xin LI" References: <201410040814.s948EBH0003546@svn.freebsd.org> <1412433165.12052.106.camel@revolution.hippie.lan> Subject: Re: svn commit: r272506 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Date: Sat, 4 Oct 2014 15:44:55 +0100 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_00D8_01CFDFEA.24FE9880" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 14:45:05 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_00D8_01CFDFEA.24FE9880 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit Does the attached patch fix this for your Ian? Regards Steve ----- Original Message ----- From: "Ian Lepore" To: "Xin LI" Cc: ; ; Sent: Saturday, October 04, 2014 3:32 PM Subject: Re: svn commit: r272506 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs > On Sat, 2014-10-04 at 08:14 +0000, Xin LI wrote: >> Author: delphij >> Date: Sat Oct 4 08:14:10 2014 >> New Revision: 272506 >> URL: https://svnweb.freebsd.org/changeset/base/272506 >> >> Log: >> MFV r272495: >> >> In arc_kmem_reap_now(), reap range_seg_cache too to reclaim memory in >> response of memory pressure. >> >> Illumos issue: >> 5163 arc should reap range_seg_cache >> >> MFC after: 1 week >> >> Modified: >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c >> Directory Properties: >> head/sys/cddl/contrib/opensolaris/ (props changed) >> >> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c >> ============================================================================== >> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sat Oct 4 08:08:56 2014 (r272505) >> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sat Oct 4 08:14:10 2014 (r272506) >> @@ -2591,6 +2591,7 @@ arc_kmem_reap_now(arc_reclaim_strategy_t >> size_t i; >> kmem_cache_t *prev_cache = NULL; >> kmem_cache_t *prev_data_cache = NULL; >> + extern kmem_cache_t *range_seg_cache; >> > > I get this when compiling sparc64 GENERIC, must be different warnings > enabled... > > cc1: warnings being treated as errors > /local/build/staging/freebsd/head/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c: In function 'arc_kmem_reap_now': > /local/build/staging/freebsd/head/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c:2594: warning: nested extern > declaration of 'range_seg_cache' [-Wnested-externs] > > -- Ian > >> DTRACE_PROBE(arc__kmem_reap_start); >> #ifdef _KERNEL >> @@ -2628,6 +2629,7 @@ arc_kmem_reap_now(arc_reclaim_strategy_t >> } >> kmem_cache_reap_now(buf_cache); >> kmem_cache_reap_now(hdr_cache); >> + kmem_cache_reap_now(range_seg_cache); >> >> #ifdef sun >> /* >> >> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c >> ============================================================================== >> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c Sat Oct 4 08:08:56 2014 (r272505) >> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c Sat Oct 4 08:14:10 2014 (r272506) >> @@ -33,7 +33,7 @@ >> #include >> #include >> >> -static kmem_cache_t *range_seg_cache; >> +kmem_cache_t *range_seg_cache; >> >> void >> range_tree_init(void) >> > > > > ------=_NextPart_000_00D8_01CFDFEA.24FE9880 Content-Type: application/octet-stream; name="range_seg.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="range_seg.patch" Index: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c (revision = 272525)=0A= +++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c (working copy)=0A= @@ -2584,6 +2584,7 @@ arc_reclaim_needed(void)=0A= =0A= extern kmem_cache_t *zio_buf_cache[];=0A= extern kmem_cache_t *zio_data_buf_cache[];=0A= +extern kmem_cache_t *range_seg_cache;=0A= =0A= static void __noinline=0A= arc_kmem_reap_now(arc_reclaim_strategy_t strat)=0A= @@ -2591,7 +2592,6 @@ arc_kmem_reap_now(arc_reclaim_strategy_t strat)=0A= size_t i;=0A= kmem_cache_t *prev_cache =3D NULL;=0A= kmem_cache_t *prev_data_cache =3D NULL;=0A= - extern kmem_cache_t *range_seg_cache;=0A= =0A= DTRACE_PROBE(arc__kmem_reap_start);=0A= #ifdef _KERNEL=0A= ------=_NextPart_000_00D8_01CFDFEA.24FE9880--