git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Ericsson <ae@op5.se>
To: Brandon Casey <casey@nrlssc.navy.mil>
Cc: Git Mailing List <git@vger.kernel.org>,
	Junio C Hamano <gitster@pobox.com>, Nicolas Pitre <nico@cam.org>
Subject: Re: [PATCH] pack-objects: Add runtime detection of online CPU's
Date: Sat, 23 Feb 2008 09:18:23 +0100	[thread overview]
Message-ID: <47BFD6CF.3040300@op5.se> (raw)
In-Reply-To: <47BF80EC.4080608@nrlssc.navy.mil>

Brandon Casey wrote:
> From: Andreas Ericsson <ae@op5.se>
> 
> Packing objects can be done in parallell nowadays, but it's
> only done if the config option pack.threads is set to a value
> above 1. Because of that, the code-path used is often not the
> most optimal one.
> 
> This patch adds a routine to detect the number of online CPU's
> at runtime (online_cpus()). When pack.threads (or --threads=) is
> given a value of 0, the number of threads is set to the number of
> online CPU's. This feature is also documented.
> 
> As per Nicolas Pitre's recommendations, the default is still to
> run pack-objects single-threaded unless explicitly activated,
> either by configuration or by command line parameter.
> 
> The routine online_cpus() is a rework of "numcpus.c", written by
> one Philip Willoughby <pgw99@doc.ic.ac.uk>. numcpus.c is in the
> public domain and can presently be downloaded from
> http://csgsoft.doc.ic.ac.uk/numcpus/
> 
> Signed-off-by: Andreas Ericsson <ae@op5.se>
> Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
> ---
> 
> 
> I reworked this patch from Andreas for detecting the number of online CPU's.
> I kept the commit message and the Signed-off-by and added my own. I'm not sure
> what the procedure is here.
> 

The changes are small enough that maintaining original authorship is probably
the right thing to do. For anything larger it would probably have made sense
to send something on top of it. For a rewrite or when implementing a feature
that was thought up by someone else, mentioning in the message who the original
idea was from is enough.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

  reply	other threads:[~2008-02-23  8:19 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-12  8:20 [PATCH] pack-objects: Add runtime detection of online CPU's Andreas Ericsson
2008-02-12  8:27 ` Shawn O. Pearce
2008-02-12  8:49 ` Johannes Sixt
2008-02-12 11:18 ` Bert Wesarg
2008-02-12 12:21   ` Andreas Ericsson
2008-02-12 14:52 ` Michael Hendricks
2008-02-12 15:44 ` Brandon Casey
2008-02-23  2:11   ` Brandon Casey
2008-02-23  8:18     ` Andreas Ericsson [this message]
     [not found]   ` <1203732369-30314-1-git-send-email-casey@nrlssc.navy.mil>
2008-02-23  2:12     ` [PATCH] pack-objects: Print a message describing the number of threads for packing Brandon Casey
2008-02-26  7:49       ` Jeff King
2008-02-26  8:00         ` Junio C Hamano
2008-02-26  8:06           ` Jeff King
2008-02-26  9:19             ` Junio C Hamano
2008-02-26  9:33               ` Jeff King
2008-02-26  9:40           ` Andreas Ericsson
2008-02-26 15:53         ` Brandon Casey
2008-02-26 17:05           ` Nicolas Pitre
2008-02-26 21:25             ` Jeff King
2008-02-26 21:21           ` Jeff King
2008-02-26 22:50             ` Brandon Casey
2008-02-26 23:04               ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47BFD6CF.3040300@op5.se \
    --to=ae@op5.se \
    --cc=casey@nrlssc.navy.mil \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=nico@cam.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).