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

Re: [RFC PATCH 0/2] Add support for multi threaded checkout

From
JPJames Pickens <jepicken@gmail.com>
Date
Dec 19, 2008, 01:04 UTC
Message-ID
<885649360812181704l3a905ebfrb90f391e86004efc@mail.gmail.com>
In-Reply-To
<494ABDC9.9060001@morey-chaisemartin.com>

On Thu, Dec 18, 2008, Nicolas Morey-Chaisemartin <devel@morey-chaisemartin.com> wrote:

> I guess you could do something like :
>
> #define checkout_lock()         core_threaded_checkout ?pthread_mutex_lock(&checkout_mutex) : (void) 0
> #define checkout_unlock()               core_threaded_checkout ?pthread_mutex_unlock(&checkout_mutex) : (void) 0

I tried that, and to make it easier to see the impact, I changed the 'wrote = write_in_full(...)' calls in entry.c to 'wrote = size'. That makes git just create a bunch of empty files instead of writing the real contents to disk. Here's the result, with core.threadedcheckout set to false, best of 2 runs:

original patch: 3.19 original + above: 3.18

So the cost of locking/unlocking the mutex looks vanishingly small in the single thread case.

This also puts an upper bound on the time required for a single thread to unpack the data.

James
Previous: James Pickens
Message 11 of 11 in “Add support for multi threaded checkout”
  1. 0/2 Add support for multi threaded checkoutPickens, James E, Dec 18, 2008
  2. 1/2 Add support for multi threaded checkoutJames Pickens, Dec 18, 2008
  3. 2/2 Add core.threadedcheckout config optionJames Pickens, Dec 18, 2008
  4. Linus TorvaldsDec 18, 2008
  5. James PickensDec 18, 2008
  6. Linus TorvaldsDec 19, 2008
  7. Nicolas PitreDec 18, 2008
  8. James PickensDec 18, 2008
  9. Nicolas Morey-ChaisemartinDec 18, 2008
  10. James PickensDec 18, 2008
  11. James PickensDec 19, 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.