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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 18, 2008, Nicolas Morey-Chaisemartin
<devel@xxxxxxxxxxxxxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux