git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan McGee <dpmcgee@gmail.com>
To: Nicolas Pitre <nico@fluxnic.net>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH] Make NO_PTHREADS the sole thread configuration variable
Date: Sat, 30 Jan 2010 20:01:02 -0600	[thread overview]
Message-ID: <449c10961001301801u46652804n507fe8a479ce66ce@mail.gmail.com> (raw)
In-Reply-To: <alpine.LFD.2.00.1001302015120.1681@xanadu.home>

On Sat, Jan 30, 2010 at 7:29 PM, Nicolas Pitre <nico@fluxnic.net> wrote:
> On Sat, 30 Jan 2010, Junio C Hamano wrote:
>
>> Dan McGee <dpmcgee@gmail.com> writes:
>>
>> > When the first piece of threaded code was introduced in commit 8ecce684, it
>> > came with its own THREADED_DELTA_SEARCH Makefile option. Since this time,
>> > more threaded code has come into the codebase and a NO_PTHREADS option has
>> > also been added. Get rid of the original option as the newer, more generic
>> > option covers everything we need.
>>
>> The patch is a good change but only in the "if it were like this from day
>> one, things would have been much simpler" sense.  It is a breakage to
>> existing users with customized THREADED_DELTA_SEARCH in their config.mak
>> files, isn't it?
>
> I think that the release of v1.7.0 is the perfect match for such a
> "breakage".  Unlike for the dashless move, I really doubt the majority
> of Git users are using a customized THREADED_DELTA_SEARCH in a
> config.mak if they do build Git themselves at all.  So very few people
> are likely to be inconvenienced, and yet the inconvenience can hardly be
> qualified as a breakage since nothing will stop working in any case.
>
>> If we take only the part of your patch that applies to Makefile, but
>> exclude the first hunk (description of THREADED_DELTA_SEARCH) and the last
>> hunk (the necessary part to keep THREADED_DELTA_SEARCH working), and
>> instead add something like:
>>
>>       ifndef NO_PTHREADS
>>               THREADED_DELTA_SEARCH = YesPlease
>>       endif
>>
>> immediately before we include config.mak, would that be a workable
>> solution to:
>>
>>  (1) keep existing users happy;
>>
>>  (2) remove the redundant logic to compute the default for two Make
>>      variables; and
>>
>>  (3) keep control over use of threading in general _and_ use of
>>      threading in delta computation?
>
> IMHO I wouldn't bother that much.  Simply mentioning in the 1.7.0
> release notes that THREADED_DELTA_SEARCH is no more should be fine.
> Like I said, the existing users who might be affected are certainly few,
> and the impact on them is rather trivial.

This is everything I wanted to say as well. I just don't think this is
that big of a deal to "break compatibility" as I can think of no
reason why you would only want 2/3 of the pthreads code enabled (your
point 3). What this does do is set the precedent for any future
threads code to only use NO_PTHREADS and not introduce yet another
preprocessor define.

If this gets applied, it needs a small correction- I can resubmit, but
the only difference is this:

diff --git a/config.mak.in b/config.mak.in
index 67b12f7..6008ac9 100644
--- a/config.mak.in
+++ b/config.mak.in
@@ -56,5 +56,4 @@ NO_DEFLATE_BOUND=@NO_DEFLATE_BOUND@
 FREAD_READS_DIRECTORIES=@FREAD_READS_DIRECTORIES@
 SNPRINTF_RETURNS_BOGUS=@SNPRINTF_RETURNS_BOGUS@
 NO_PTHREADS=@NO_PTHREADS@
-THREADED_DELTA_SEARCH=@THREADED_DELTA_SEARCH@
 PTHREAD_LIBS=@PTHREAD_LIBS@


-Dan

  reply	other threads:[~2010-01-31  2:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-30  1:22 [PATCH] Make NO_PTHREADS the sole thread configuration variable Dan McGee
2010-01-30 17:43 ` Junio C Hamano
2010-01-31  1:29   ` Nicolas Pitre
2010-01-31  2:01     ` Dan McGee [this message]
2010-01-31 19: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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=449c10961001301801u46652804n507fe8a479ce66ce@mail.gmail.com \
    --to=dpmcgee@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=nico@fluxnic.net \
    /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).