From: "Shawn O. Pearce" <spearce@spearce.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Johannes Sixt <j6t@kdbg.org>, git@vger.kernel.org
Subject: Re: [PATCH 0/6] Pass t5530 on Windows
Date: Sat, 6 Mar 2010 13:50:51 -0800 [thread overview]
Message-ID: <20100306215051.GE2529@spearce.org> (raw)
In-Reply-To: <7vk4tpdx9x.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> wrote:
> Johannes Sixt <j6t@kdbg.org> writes:
>
> > Quite frankly, I don't quite know what to do with this series. On the
> > one hand, it is a clean-up, but in practice it is not relevant whether
> > die() kills only the async thread or the whole process because all
> > callers of async die() themselves anyway when the async procedure died.
> > On the other hand, it does enable threaded async procedures on POSIX...
...
> . It must not change the program's state that the caller of the
> facility also uses.
>
> And calling die() from async is obviously "change the program's state that
> the caller of the facility also uses". We didn't uncover this as a bug
> because the above "serious restrictions" go both ways.
I agree with you Junio. I think that any async helper that is
invoking die() in its code path is wrong. Just like its also
wrong for an async helper to try and use the sha1_file.c family
of functions. The helper should return failure and let its caller
handle the process termination.
Hell, its even wrong for an async helper to use xmalloc(), because in
a low-memory situation that xmalloc may try to remove pack windows
*without locking*. _DOUBLE_PLUS_UNGOOD_
> If we make threaded-async the default on any platform that is thread
> capable, we would increase the likelihood of catching bugs that violate
> the latter condition.
I'm in favor of that. If we have threaded delta search enabled,
we probably can also run these async procedures in a POSIX thread
rather than forking off a child. Though on our primary target
platform of Linux, the performance difference either way probably
cannot be measured.
--
Shawn.
next prev parent reply other threads:[~2010-03-06 21:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-06 15:40 [PATCH 0/6] Pass t5530 on Windows Johannes Sixt
2010-03-06 20:12 ` Junio C Hamano
2010-03-06 21:50 ` Shawn O. Pearce [this message]
2010-03-09 20:00 ` [PATCH 7/6] Enable threaded async procedures whenever pthreads is available Johannes Sixt
2010-03-09 23:43 ` Shawn O. Pearce
2010-03-10 22:28 ` Junio C Hamano
2010-03-11 19:53 ` Johannes Sixt
2010-03-12 5:56 ` Junio C Hamano
2010-03-17 21:28 ` Johannes Sixt
2010-03-17 22:19 ` Junio C Hamano
2010-03-23 8:15 ` Fredrik Kuivinen
2010-03-23 20:19 ` Johannes Sixt
2010-03-23 20:25 ` Johannes Sixt
2010-03-23 20:44 ` Junio C Hamano
2010-03-23 21:09 ` Johannes Sixt
2010-03-23 21:42 ` Fredrik Kuivinen
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=20100306215051.GE2529@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j6t@kdbg.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).