From: Stefan Beller <sbeller@google.com>
To: git@vger.kernel.org
Cc: peff@peff.net, gitster@pobox.com, jrnieder@gmail.com,
johannes.schindelin@gmail.com, Jens.Lehmann@web.de,
vlovich@gmail.com, Stefan Beller <sbeller@google.com>
Subject: [RFC PATCHv1 0/2] Parallel git submodule fetching
Date: Fri, 11 Sep 2015 16:09:52 -0700 [thread overview]
Message-ID: <1442012994-20374-1-git-send-email-sbeller@google.com> (raw)
This is a new approach to making git submodules faster without using threads.
We'll directly run commands in parallel without an intermediate thread pool.
patch 1 is fixing an error, which was hard to come by in a parallel world,
but is not much of a problem in a single-childed world.
The second patch works fine, (I'd love to hear feedback on the percieved
change of output) though it has still two edges I want to tackle:
* The fcntl call to make the pipes nonblocking is not checked for errors.
* We also need to communicate back if one process cannot spawn or such,
i.e. the reporting for all subprocesses combined needs to added. I think
about adding another callback which is called to finish up a child process.
Earlier attempts used a threading pool, which made the conversion very
easy as you don't need to touch lots of existing code as you would just
replace the run_command(..) call by an add_task(..). The threading pool
would abstract away the whole parallelism and its problems. It would also
have the backpressure to the main program, add_task would just not
return if there was no place left in the queue.
[1] http://www.spinics.net/lists/git/msg258435.html
Any feedback welcome!
Thanks,
Stefan
Jonathan Nieder (1):
Sending "Fetching submodule <foo>" output to stderr
Stefan Beller (1):
fetch: fetch submodules in parallel
Documentation/fetch-options.txt | 7 ++
builtin/fetch.c | 6 +-
builtin/pull.c | 6 ++
run-command.c | 144 ++++++++++++++++++++++++++++++++++++++++
run-command.h | 29 ++++++++
strbuf.c | 31 +++++++++
strbuf.h | 1 +
submodule.c | 99 +++++++++++++++++----------
submodule.h | 2 +-
t/t0061-run-command.sh | 16 +++++
t/t5526-fetch-submodules.sh | 70 ++++++++++++-------
test-run-command.c | 23 +++++++
12 files changed, 373 insertions(+), 61 deletions(-)
--
2.6.0.rc0.131.gf624c3d
next reply other threads:[~2015-09-11 23:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-11 23:09 Stefan Beller [this message]
2015-09-11 23:09 ` [PATCH 1/2] Sending "Fetching submodule <foo>" output to stderr Stefan Beller
2015-09-11 23:09 ` [PATCH 2/2] fetch: fetch submodules in parallel Stefan Beller
2015-09-12 19:11 ` Junio C Hamano
2015-09-14 16:46 ` Stefan Beller
2015-09-14 17:17 ` Jeff King
2015-09-14 17:47 ` Stefan Beller
2015-09-14 17:55 ` Jonathan Nieder
2015-09-14 18:07 ` Jeff King
2015-09-14 21:50 ` [PATCHv2] " Stefan Beller
2015-09-14 21:50 ` [PATCHv2] fetch: " Stefan Beller
2015-09-14 22:06 ` [PATCHv2] " Junio C Hamano
2015-09-14 17:56 ` [PATCH 2/2] fetch: " 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=1442012994-20374-1-git-send-email-sbeller@google.com \
--to=sbeller@google.com \
--cc=Jens.Lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=johannes.schindelin@gmail.com \
--cc=jrnieder@gmail.com \
--cc=peff@peff.net \
--cc=vlovich@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).