From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 16:16:39 2015 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 D1F19E70; Mon, 9 Feb 2015 16:16:39 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A88EA82E; Mon, 9 Feb 2015 16:16:39 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B6989B91E; Mon, 9 Feb 2015 11:16:38 -0500 (EST) From: John Baldwin To: Rui Paulo Subject: Re: svn commit: r278433 - in head: . contrib/xz contrib/xz/src/common contrib/xz/src/liblzma contrib/xz/src/liblzma/api contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/check contrib/xz/src/liblz... Date: Mon, 09 Feb 2015 11:16:13 -0500 Message-ID: <46013627.EoFa6fsn0l@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <201502090620.t196KZSk040702@svn.freebsd.org> References: <201502090620.t196KZSk040702@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 09 Feb 2015 11:16:38 -0500 (EST) 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.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, 09 Feb 2015 16:16:39 -0000 On Monday, February 09, 2015 06:20:35 AM Rui Paulo wrote: > Author: rpaulo > Date: Mon Feb 9 06:20:34 2015 > New Revision: 278433 > URL: https://svnweb.freebsd.org/changeset/base/278433 > > Log: > Merge xz 5.2.0. > > This brings support for multi-threaded compression. This brings close > N times faster compression where N is the number of CPU cores. > Because of this, liblzma now depends on libthr. > > Soon libarchive will be modified to use the new lzma API. > > Thanks to antoine@ for the exp-run. It looks like this uses hw.ncpu to determine the number of cores. Can you make this cpuset friendly by querying the current process's CPU mask and counting the cores it contains instead? Somethign like: cpuset_t set; cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, &set, sizeof(set)); (I have a CPU_COUNT() macro I should commit that will then let you do:) ncpus = CPU_COUNT(&set); -- John Baldwin