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...

Rui Paulo rpaulo at me.com
Mon Feb 9 16:41:51 UTC 2015


On Feb 9, 2015, at 08:16, John Baldwin <jhb at freebsd.org> wrote:
> 
> 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);

Yes, makes sense.  I'll wait for CPU_COUNT().

--
Rui Paulo





More information about the svn-src-all mailing list