git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] pack-objects: Add runtime detection of online CPU's

From
Andreas Ericsson <ae@op5.se>
Date
Feb 23, 2008, 08:18 UTC
Message-ID
<47BFD6CF.3040300@op5.se>
In-Reply-To
<47BF80EC.4080608@nrlssc.navy.mil>
Brandon Casey wrote:
Show 30 quoted lines
> 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
Previous: Brandon CaseyNext: Brandon Casey
Message 9 of 22 in “pack-objects: Add runtime detection of online CPU's”
  1. pack-objects: Add runtime detection of online CPU'sAndreas Ericsson, Feb 12, 2008
  2. Shawn O. PearceFeb 12, 2008
  3. Johannes SixtFeb 12, 2008
  4. Bert WesargFeb 12, 2008
  5. Andreas EricssonFeb 12, 2008
  6. Michael HendricksFeb 12, 2008
  7. Brandon CaseyFeb 12, 2008
  8. pack-objects: Add runtime detection of online CPU'sBrandon Casey, Feb 23, 2008
  9. Andreas EricssonFeb 23, 2008
  10. pack-objects: Print a message describing the number of threads for packingBrandon Casey, Feb 23, 2008
  11. Jeff KingFeb 26, 2008
  12. Junio C HamanoFeb 26, 2008
  13. Jeff KingFeb 26, 2008
  14. Junio C HamanoFeb 26, 2008
  15. Jeff KingFeb 26, 2008
  16. Andreas EricssonFeb 26, 2008
  17. Brandon CaseyFeb 26, 2008
  18. Nicolas PitreFeb 26, 2008
  19. Jeff KingFeb 26, 2008
  20. Jeff KingFeb 26, 2008
  21. Brandon CaseyFeb 26, 2008
  22. Jeff KingFeb 26, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.