From: Junio C Hamano <gitster@pobox.com>
To: Stefan Beller <sbeller@google.com>
Cc: "git\@vger.kernel.org" <git@vger.kernel.org>,
Heiko Voigt <hvoigt@hvoigt.net>,
Jens Lehmann <jens.lehmann@web.de>
Subject: Re: [PATCH] Add fetch.recurseSubmoduleParallelism config option
Date: Tue, 13 Oct 2015 00:32:56 -0700 [thread overview]
Message-ID: <xmqqzizn9qaf.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <CAGZ79kZuZZivs8czV2P6uHWaU6ay1hG21k-_G9tgN5KbV6jW8w@mail.gmail.com> (Stefan Beller's message of "Mon, 12 Oct 2015 16:31:18 -0700")
Stefan Beller <sbeller@google.com> writes:
>> The parallel_process API could learn a new "verbose" feature that it
>> by itself shows some messages like
>>
>> "processing the 'frotz' job with N tasks"
>> "M tasks finished (N still running)"
>
> I know what to fill in for M and N, 'frotz' is a bit unclear to me.
At least I don't know what M and N should be, and I'm curious how
you'll define them. See below.
>> in the output stream from strategic places. For example, the first
>> message will come at the end of pp_init(), and the second message
>> will be appended at the end of buffered output of a task that has
>> just been finished. Once you have something like that, you could
>> check for them in a test in t/.
>>
>> Just a thought.
>
> I like that thought. :)
A few more random thoughts:
* The only thing you could rely on if you were to use the above in
your tests is the one from pp_init() that declares how many
processes the machinery is going to use. M/N will be unstable,
depending on the scheduling order (e.g. the foreground process
may take a lot of time to finish, while many other processes
finish first).
* Every time the foreground process (i.e. the one whose output is
tee-ed to the overall output from the machinery) finishes, you
can emit "M tasks finished (N still running)", but I am not sure
what M should be. It is debatable how to account for background
processes that have already completed but whose output haven't
been shown.
One school of thought that is in line with the "pretend as if the
background tasks are started immediately after the foreground
task finishes, and they run at infinite speed and produce output
in no time" idea, on which the "queue output from the background
processes and emit at once in order to avoid intermixing" design
was based on, would be not to include them in M (i.e. finished
ones), because their output haven't been emitted and we are
pretending that they haven't even been started. If you take this
approach, you however may have to include them in N (i.e. still
running), but that would likely bump N beyond the maximum number
of simultaneous processes.
The other school of thought would of course tell the truth and
include the number of finished background processes in M, as they
have finished already in the reality. This will not risk showing
N that is beyond the maximum, but your first "progress" output
might say "3 tasks finished", which will make it look odd in a
different way.
next prev parent reply other threads:[~2015-10-13 7:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-12 22:52 [PATCH] Add fetch.recurseSubmoduleParallelism config option Stefan Beller
2015-10-12 23:14 ` Junio C Hamano
2015-10-12 23:31 ` Stefan Beller
2015-10-12 23:50 ` Junio C Hamano
2015-10-16 17:04 ` Stefan Beller
2015-10-16 17:26 ` Junio C Hamano
2015-10-13 7:32 ` Junio C Hamano [this message]
2015-10-13 16:03 ` Stefan Beller
2015-10-13 21:07 ` 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=xmqqzizn9qaf.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=hvoigt@hvoigt.net \
--cc=jens.lehmann@web.de \
--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.
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).