[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] core-count: A new program to count the number of cpucores
From: |
Pádraig Brady |
Subject: |
Re: [PATCH] core-count: A new program to count the number of cpucores |
Date: |
Mon, 26 Oct 2009 10:33:21 +0000 |
User-agent: |
Thunderbird 2.0.0.6 (X11/20071008) |
Gilles Espinasse wrote:
> ----- Original Message -----
> From: "Giuseppe Scrivano" <address@hidden>
>>
>> For example, assuming that `sort' will soon get the --threads option and
>> an user decides to use all cores except one to sort a file, then it can
>> be done as:
>>
>> sort --threads="$(($(core-count) - 1))" huge_file
> that assume --threads is able to handle negative count or 0
> Would not be more efficient to handle the count in core-count?
> That mean core-count should always report a minimum of 1 and discount from
> total the number passed as an option.
Hmm it's a bit surprising that min()/max() are not available
as $((shell arithmetic)) or in `expr`. Consequently I agree that
adding the option you suggest is useful. What will we call it though?
Maybe:
--ignore=N If possible reduce the count by N
> Probably the first usage of core-count will be to feed make -j
Note for commands that do split the data internally
and process in parallel, I dislike the --threads name
since it implies a particular implementation.
So how about sort -j,--jobs to match `make`?
Though personally I like --mproc ?
cheers,
Pádraig.
- Re: [PATCH] md5: accepts a new --threads option, (continued)
- Re: [PATCH] md5: accepts a new --threads option, Giuseppe Scrivano, 2009/10/25
- Re: [PATCH] md5: accepts a new --threads option, Jim Meyering, 2009/10/25
- Re: [PATCH] md5: accepts a new --threads option, Jim Meyering, 2009/10/25
- [PATCH] core-count: A new program to count the number of cpu cores (was: [PATCH] md5: accepts a new --threads option), Giuseppe Scrivano, 2009/10/25
- Re: [PATCH] core-count: A new program to count the number of cpu cores (was: [PATCH] md5: accepts a new --threads option), Pádraig Brady, 2009/10/25
- Re: [PATCH] core-count: A new program to count the number of cpu cores, Bruno Haible, 2009/10/25
- Re: [PATCH] core-count: A new program to count the number of cpu cores, Giuseppe Scrivano, 2009/10/25
- Re: [PATCH] core-count: A new program to count the number of cpucores, Gilles Espinasse, 2009/10/26
- Re: [PATCH] core-count: A new program to count the number of cpucores,
Pádraig Brady <=
- Re: [PATCH] core-count: A new program to count the number of cpucores, Paolo Bonzini, 2009/10/26
- Re: [PATCH] core-count: A new program to count the number of cpucores, Giuseppe Scrivano, 2009/10/26
- Re: [PATCH] core-count: A new program to count the number of cpucores, Bruno Haible, 2009/10/26
- Re: [PATCH] core-count: A new program to count the number of cpucores, Pádraig Brady, 2009/10/27
- Re: [PATCH] core-count: A new program to count the number of cpu cores, Bruno Haible, 2009/10/26
- Re: [PATCH] core-count: A new program to count the number of cpu cores, Giuseppe Scrivano, 2009/10/27
- Re: [PATCH] core-count: A new program to count the number of cpu cores, Paolo Bonzini, 2009/10/27
- Re: [PATCH] core-count: A new program to count the number of cpu cores, Pádraig Brady, 2009/10/27
- Re: [PATCH] core-count: A new program to count the number of cpu cores, Pádraig Brady, 2009/10/27
- Message not available
- Re: [PATCH] core-count: A new program to count the number of cpu cores, Pádraig Brady, 2009/10/27