From owner-svn-src-all@FreeBSD.ORG Tue Jun 18 08:25:26 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 BA5B9B5D for ; Tue, 18 Jun 2013 08:25:26 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 186C61624 for ; Tue, 18 Jun 2013 08:25:25 +0000 (UTC) Received: (qmail 50730 invoked from network); 18 Jun 2013 09:20:07 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 18 Jun 2013 09:20:07 -0000 Message-ID: <51C01964.1000006@freebsd.org> Date: Tue, 18 Jun 2013 10:25:08 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: Jeff Roberson Subject: Re: svn commit: r251894 - in head: lib/libmemstat sys/vm References: <201306180450.r5I4oKoY091256@svn.freebsd.org> In-Reply-To: <201306180450.r5I4oKoY091256@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org 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: Tue, 18 Jun 2013 08:25:26 -0000 On 18.06.2013 06:50, Jeff Roberson wrote: > Author: jeff > Date: Tue Jun 18 04:50:20 2013 > New Revision: 251894 > URL: http://svnweb.freebsd.org/changeset/base/251894 > > Log: > Refine UMA bucket allocation to reduce space consumption and improve > performance. > > - Always free to the alloc bucket if there is space. This gives LIFO > allocation order to improve hot-cache performance. This also allows > for zones with a single bucket per-cpu rather than a pair if the entire > working set fits in one bucket. > - Enable per-cpu caches of buckets. To prevent recursive bucket > allocation one bucket zone still has per-cpu caches disabled. > - Pick the initial bucket size based on a table driven maximum size > per-bucket rather than the number of items per-page. This gives > more sane initial sizes. > - Only grow the bucket size when we face contention on the zone lock, this > causes bucket sizes to grow more slowly. > - Adjust the number of items per-bucket to account for the header space. > This packs the buckets more efficiently per-page while making them > not quite powers of two. > - Eliminate the per-zone free bucket list. Always return buckets back > to the bucket zone. This ensures that as zones grow into larger > bucket sizes they eventually discard the smaller sizes. It persists > fewer buckets in the system. The locking is slightly trickier. > - Only switch buckets in zalloc, not zfree, this eliminates pathological > cases where we ping-pong between two buckets. > - Ensure that the thread that fills a new bucket gets to allocate from > it to give a better upper bound on allocation time. There used to be a problem with per CPU caches accumulating large amounts of items without freeing back to the global (or socket) pool. Do these updates to UMA change this situation and/or do you have further improvements coming up? -- Andre