git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J.C. Pizarro" <jcpiza@gmail.com>
To: "Jon Smirl" <jonsmirl@gmail.com>,
	 	"Linus Torvalds" <torvalds@linux-foundation.org>
Cc: "Jeff King" <peff@peff.net>, "Nicolas Pitre" <nico@cam.org>,
	 	"Daniel Berlin" <dberlin@dberlin.org>,
	 	"Harvey Harrison" <harvey.harrison@gmail.com>,
	 	"David Miller" <davem@davemloft.net>,
	ismail@pardus.org.tr,  	gcc@gcc.gnu.org, git@vger.kernel.org
Subject: Re: Git and GCC. Why not with fork, exec and pipes like in linux?
Date: Thu, 6 Dec 2007 21:37:32 +0100	[thread overview]
Message-ID: <998d0e4a0712061237j6ed43aaav5934e4fe63398233@mail.gmail.com> (raw)
In-Reply-To: <998d0e4a0712061125h3d44139ctb7f5600bc8467292@mail.gmail.com>

On 2007/12/6, J.C. Pizarro <jcpiza@gmail.com>, i wrote:
> For multicores CPUs, don't divide the work in threads.
> To divide the work in processes!
>
> Tips, tricks and hacks: to use fork, exec, pipes and another IPC mechanisms like
> mutexes, shared memory's IPC, file locks, pipes, semaphores, RPCs, sockets, etc.
> to access concurrently and parallely to the filelocked database.

I'm sorry, we don't need exec. We need fork, pipes and another IPC mechanisms
because it so shares easy the C code for parallelism.

Thanks to Linus because GIT is implemented in C language to interact with
system calls of the kernel written in C.

> For Intel Quad Core e.g., x4 cores, it need a parent process and 4
> child processes linked to the parent with pipes.

For peak performance (e.g 99.9% usage), the minimum number of child
processes should be more than 4, normally between e.g. 6 and 10 processes
depending on the statistics of idle's stalls of the cores.

> The parent process can be
> * no-threaded using select/epoll/libevent
> * threaded using Pth (GNU Portable Threads), NPTL (from RedHat) or whatever.

Note: there is a little design's problem with slowdown of I/O bandwith when
the parent is multithreaded and the children MUST to be multithreaded that
we can't avoid them to be non-multithreaded for maximum I/O bandwith.

The "finding of the smallest spanning forest with deltas" consumes a lot of
CPU, so if it scales well in a CPU x4 cores then it can to reduce 4
hours to 1 hour.

   J.C.Pizarro :)

      reply	other threads:[~2007-12-06 20:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-06 19:25 Git and GCC. Why not with fork, exec and pipes like in linux? J.C. Pizarro
2007-12-06 20:37 ` J.C. Pizarro [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

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

  git send-email \
    --in-reply-to=998d0e4a0712061237j6ed43aaav5934e4fe63398233@mail.gmail.com \
    --to=jcpiza@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dberlin@dberlin.org \
    --cc=gcc@gcc.gnu.org \
    --cc=git@vger.kernel.org \
    --cc=harvey.harrison@gmail.com \
    --cc=ismail@pardus.org.tr \
    --cc=jonsmirl@gmail.com \
    --cc=nico@cam.org \
    --cc=peff@peff.net \
    --cc=torvalds@linux-foundation.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).