From owner-svn-src-all@FreeBSD.ORG Sun Apr 28 07:52:46 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B0345CFD; Sun, 28 Apr 2013 07:52:46 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A08CD1C93; Sun, 28 Apr 2013 07:52:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3S7qkTL091358; Sun, 28 Apr 2013 07:52:46 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3S7qkFE091357; Sun, 28 Apr 2013 07:52:46 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201304280752.r3S7qkFE091357@svn.freebsd.org> From: Martin Matuska Date: Sun, 28 Apr 2013 07:52:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r250017 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 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: Sun, 28 Apr 2013 07:52:46 -0000 Author: mm Date: Sun Apr 28 07:52:46 2013 New Revision: 250017 URL: http://svnweb.freebsd.org/changeset/base/250017 Log: Update vendor-sys/illumos/dist to illumos-gate 14020:3843f7c5f635 Illumos ZFS issues: 3705 stack overflow due to zfs lz4 compression Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/lz4.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/lz4.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/lz4.c Sun Apr 28 07:48:53 2013 (r250016) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/lz4.c Sun Apr 28 07:52:46 2013 (r250017) @@ -197,20 +197,17 @@ lz4_decompress(void *s_start, void *d_st defined(__amd64) || defined(__ppc64__) || defined(_WIN64) || \ defined(__LP64__) || defined(_LP64)) #define LZ4_ARCH64 1 -/* - * Illumos: On amd64 we have 20k of stack and 24k on sun4u and sun4v, so we - * can spend 16k on the algorithm - */ -#define STACKLIMIT 12 #else #define LZ4_ARCH64 0 +#endif + /* - * Illumos: On i386 we only have 12k of stack, so in order to maintain the - * same COMPRESSIONLEVEL we have to use heap allocation. Performance will - * suck, but alas, it's ZFS on 32-bit we're talking about, so... + * Limits the amount of stack space that the algorithm may consume to hold + * the compression lookup table. The value `9' here means we'll never use + * more than 2k of stack (see above for a description of COMPRESSIONLEVEL). + * If more memory is needed, it is allocated from the heap. */ -#define STACKLIMIT 11 -#endif +#define STACKLIMIT 9 /* * Little Endian or Big Endian? @@ -240,11 +237,7 @@ lz4_decompress(void *s_start, void *d_st #define LZ4_FORCE_UNALIGNED_ACCESS 1 #endif -/* - * Illumos: we can't use GCC's __builtin_ctz family of builtins in the - * kernel - */ -#define LZ4_FORCE_SW_BITCOUNT +/* #define LZ4_FORCE_SW_BITCOUNT */ /* * Compiler Options