From owner-svn-src-all@FreeBSD.ORG Thu Aug 14 05:13:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D7D94F0; Thu, 14 Aug 2014 05:13:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A39B2152; Thu, 14 Aug 2014 05:13:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7E5DP6K069700; Thu, 14 Aug 2014 05:13:25 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7E5DPRb069698; Thu, 14 Aug 2014 05:13:25 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201408140513.s7E5DPRb069698@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 14 Aug 2014 05:13:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269963 - head/sys/kern X-SVN-Group: head 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.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: Thu, 14 Aug 2014 05:13:25 -0000 Author: delphij Date: Thu Aug 14 05:13:24 2014 New Revision: 269963 URL: http://svnweb.freebsd.org/changeset/base/269963 Log: Re-instate UMA cached backend for 4K - 64K allocations. New consumers like geli(4) uses malloc(9) to allocate temporary buffers that gets free'ed shortly, causing frequent TLB shootdown as observed in hwpmc supported flame graph. Discussed with: jeff, alfred MFC after: 1 week Modified: head/sys/kern/kern_malloc.c Modified: head/sys/kern/kern_malloc.c ============================================================================== --- head/sys/kern/kern_malloc.c Thu Aug 14 05:00:45 2014 (r269962) +++ head/sys/kern/kern_malloc.c Thu Aug 14 05:13:24 2014 (r269963) @@ -120,7 +120,7 @@ static int kmemcount; #define KMEM_ZBASE 16 #define KMEM_ZMASK (KMEM_ZBASE - 1) -#define KMEM_ZMAX PAGE_SIZE +#define KMEM_ZMAX 65536 #define KMEM_ZSIZE (KMEM_ZMAX >> KMEM_ZSHIFT) static uint8_t kmemsize[KMEM_ZSIZE + 1]; @@ -151,21 +151,10 @@ struct { {1024, "1024", }, {2048, "2048", }, {4096, "4096", }, -#if PAGE_SIZE > 4096 {8192, "8192", }, -#if PAGE_SIZE > 8192 {16384, "16384", }, -#if PAGE_SIZE > 16384 {32768, "32768", }, -#if PAGE_SIZE > 32768 {65536, "65536", }, -#if PAGE_SIZE > 65536 -#error "Unsupported PAGE_SIZE" -#endif /* 65536 */ -#endif /* 32768 */ -#endif /* 16384 */ -#endif /* 8192 */ -#endif /* 4096 */ {0, NULL}, };