git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Stefan Beller <sbeller@google.com>
Cc: git@vger.kernel.org, ramsay@ramsayjones.plus.com,
	jacob.keller@gmail.com, peff@peff.net, jrnieder@gmail.com,
	johannes.schindelin@gmail.com, Jens.Lehmann@web.de,
	ericsunshine@gmail.com
Subject: Re: [PATCHv6 0/8] fetch submodules in parallel
Date: Fri, 02 Oct 2015 11:48:18 -0700	[thread overview]
Message-ID: <xmqqeghd5cp9.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <1443664456-1307-1-git-send-email-sbeller@google.com> (Stefan Beller's message of "Wed, 30 Sep 2015 18:54:08 -0700")

Stefan Beller <sbeller@google.com> writes:

> * renamed return_value_fn to task_finished_fn

It made interdiff noisier but I think it gives us a good end result.

> * the main loop of the parallel processing was first adapted to Junios suggestion,
>   but Jonathan pointed out more improvements.  We can get rid of `no_more_task`
>   completely as `if (!pp->nr_processes)` as the exit condition is sufficient.
>   (pp->nr_processes is modified only when starting or reaping a child, so we will
>   capture the whole output of each subprocess even in case of a quick shutdown)

Interesting.  The original motivation for "no-more-task" check was
that even when we are no longer running anything (i.e. everybody
finished) we may get a new task from next_task(), and the condition
to "break" out of the loop could be placed anywhere in that loop
(e.g. after we wait and cull the finished tasks, or even in the
outermost while(1) condition).

But you can take advantage of the specific placement of the check;
it is after the part that spawns new tasks and before the part that
culls the existing tasks, so not having any running task at that
point is sufficient condition.

Will replace what was queued.

Thanks.

      parent reply	other threads:[~2015-10-02 18:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-01  1:54 [PATCHv6 0/8] fetch submodules in parallel Stefan Beller
2015-10-01  1:54 ` [PATCHv6 1/8] submodule.c: write "Fetching submodule <foo>" to stderr Stefan Beller
2015-10-01  1:54 ` [PATCHv6 2/8] xread: poll on non blocking fds Stefan Beller
2015-10-01  1:54 ` [PATCHv6 3/8] xread_nonblock: add functionality to read from fds without blocking Stefan Beller
2015-10-01  1:54 ` [PATCHv6 4/8] strbuf: add strbuf_read_once to read " Stefan Beller
2015-10-01  1:54 ` [PATCHv6 5/8] sigchain: add command to pop all common signals Stefan Beller
2015-10-01  1:54 ` [PATCHv6 6/8] run-command: add an asynchronous parallel child processor Stefan Beller
2015-10-01  1:54 ` [PATCHv6 7/8] fetch_populated_submodules: use new parallel job processing Stefan Beller
2015-10-01  1:54 ` [PATCHv6 8/8] submodules: allow parallel fetching, add tests and documentation Stefan Beller
2015-10-01 18:55 ` [PATCHv6 0/8] fetch submodules in parallel Ramsay Jones
2015-10-01 19:03   ` Stefan Beller
2015-10-02 18:48 ` Junio C Hamano [this message]

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=xmqqeghd5cp9.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=Jens.Lehmann@web.de \
    --cc=ericsunshine@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jacob.keller@gmail.com \
    --cc=johannes.schindelin@gmail.com \
    --cc=jrnieder@gmail.com \
    --cc=peff@peff.net \
    --cc=ramsay@ramsayjones.plus.com \
    --cc=sbeller@google.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).