From: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
To: Duy Nguyen <pclouds@gmail.com>, Junio C Hamano <gitster@pobox.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: What's cooking in git.git (Apr 2014, #03; Fri, 11)
Date: Wed, 16 Apr 2014 12:31:55 +0100 [thread overview]
Message-ID: <534E6A2B.5060903@ramsay1.demon.co.uk> (raw)
In-Reply-To: <CACsJy8C_WU_-73+VF0KV1X1BLDSWH_C35jPjMcrjR2OW3s9z-Q@mail.gmail.com>
On 16/04/14 00:18, Duy Nguyen wrote:
> On Tue, Apr 15, 2014 at 11:45 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:
>>
>>> On 11/04/14 23:22, Junio C Hamano wrote:
>>> [...]
>>>> [New Topics]
>>>>
>>>> * nd/index-pack-one-fd-per-thread (2014-04-09) 1 commit
>>>> - index-pack: work around thread-unsafe pread()
>>>>
>>>> Enable threaded index-pack on platforms without thread-unsafe
>>>> pread() emulation.
>>>>
>>>> Will merge to 'next' and keep it there for the remainder of the cycle.
>>>
>>> The commit message for commit 512ebe5d ("index-pack: work around
>>> thread-unsafe pread()", 25-03-2014) is a little misleading.
>>
>> OK. Can we have a concrete alternative?
>>
>> Multi-threaing of index-pack was disabled with c0f8654
>> (index-pack: Disable threading on cygwin - 2012-06-26), because
>> pread() implementations for Cygwin and MSYS were not thread
>> safe. Recent Cygwin does offer usable pread() and we enabled
>> multi-threading with 103d530f (Cygwin 1.7 has thread-safe pread,
>> 2013-07-19).
>>
>> Work around this problem on platforms with a thread-unsafe
>> pread() emulation by opening one file handle per thread; it
>> would prevent parallel pread() on different file handles from
>> stepping on each other.
>>
>> Also remove NO_THREAD_SAFE_PREAD that was introduced in c0f8654
>> because it's no longer used anywhere.
>>
>> This workaround is unconditional, even for platforms with
>> thread-safe pread() because the overhead is small (a couple file
>> handles more) and not worth fragmenting the code.
>>
>
> OK to me.
Yep, this looks good to me too.
Thanks!
ATB,
Ramsay Jones
next prev parent reply other threads:[~2014-04-16 11:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-11 22:22 What's cooking in git.git (Apr 2014, #03; Fri, 11) Junio C Hamano
2014-04-11 23:27 ` Felipe Contreras
2014-04-12 6:49 ` Junio C Hamano
2014-04-12 18:29 ` Ramsay Jones
2014-04-15 16:45 ` Junio C Hamano
2014-04-15 23:18 ` Duy Nguyen
2014-04-16 11:31 ` Ramsay Jones [this message]
2014-04-13 20:18 ` Michael Haggerty
2014-04-17 16:52 ` W. Trevor King
2014-04-17 17:52 ` Junio C Hamano
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=534E6A2B.5060903@ramsay1.demon.co.uk \
--to=ramsay@ramsay1.demon.co.uk \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pclouds@gmail.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).