From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 13:01:38 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6DD7E2B8; Mon, 8 Dec 2014 13:01:38 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id CC3BFEDF; Mon, 8 Dec 2014 13:01:30 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA05577; Mon, 08 Dec 2014 15:03:22 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1XxxwN-0006VY-8H; Mon, 08 Dec 2014 15:01:27 +0200 Message-ID: <5485A0E9.2010807@FreeBSD.org> Date: Mon, 08 Dec 2014 15:00:25 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Xin LI , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-stable@FreeBSD.org, svn-src-stable-10@FreeBSD.org Subject: Re: svn commit: r275492 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs References: <201412050032.sB50WXki040350@svn.freebsd.org> In-Reply-To: <201412050032.sB50WXki040350@svn.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2014 13:01:38 -0000 On 05/12/2014 02:32, Xin LI wrote: > Author: delphij > Date: Fri Dec 5 00:32:33 2014 > New Revision: 275492 > URL: https://svnweb.freebsd.org/changeset/base/275492 > > Log: > MFC r274172 (avg) > > fix l2arc compression buffers leak Thanks a lot! BTW, do you plan to MFC this commit to stable/9? It seems that r268075 and r268858 need MFC-ing to that branch as well. > We have observed that arc_release() can be called concurrently with a > l2arc in-flight write. > Also, we have observed that arc_hdr_destroy() can be called from > arc_write_done() for a zio with ZIO_FLAG_IO_REWRITE flag in similar > circumstances. > > Previously the l2arc headers would be freed while leaking their > associated compression buffers. Now the buffers are placed on > l2arc_free_on_write list for delayed freeing. This is similar to what > was already done to arc buffers that were supposed to be freed > concurrently with in-flight writes of those buffers. > > In addition to fixing the discovered leaks this change also adds some > protective code to assert that a compression buffer associated with a > l2arc header is never leaked. > > A new kstat l2_cdata_free_on_write is added. It keeps a count of > delayed compression buffer frees which previously would have been leaks. > > Tested by: Vitalij Satanivskij et al > Requested by: many > Sponsored by: HybridCluster / ClusterHQ > > This is a 10.1-RELEASE errata candidate. > > Modified: > stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c > Directory Properties: > stable/10/ (props changed) -- Andriy Gapon