Re: [PATCH v2 2/2] index-pack: support multithreaded delta resolving
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Mar 12, 2012, 12:18 UTC
- Message-ID
- <CACsJy8A5xY54Ls+yWbY3E_aef22Znu4Jygdoppx4_3+DL17zDA@mail.gmail.com>
- In-Reply-To
- <87boo282hg.fsf@thomas.inf.ethz.ch>
On Mon, Mar 12, 2012 at 6:47 PM, Thomas Rast <trast@inf.ethz.ch> wrote:
Show 22 quoted lines
> Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes: > >> 2012/3/12 Thomas Rast <trast@inf.ethz.ch>: >>> Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes: >>> >>>> This puts delta resolving on each base on a separate thread, one base >>>> cache per thread. Per-thread data is grouped in struct thread_local. >>>> When running with nr_threads == 1, no pthreads calls are made. The >>>> system essentially runs in non-thread mode. >>> >>> As discussed when we took the git-grep measurements, it may be >>> interesting to have a way to run 1 thread. Can you put in such an >>> option? >> >> Sorry I wasn't clear, nr_threads == 1 is equivalent to --threads=1. So >> yes it supports running in non-thread mode. > > Well, in that case I wasn't clear: I meant that there should be a way to > run with the whole threading machinery enabled, but still only have one > thread (doing the work, possibly having another that fills the queue). > > That allows us to see how big the overhead is.
I really don't want to add overhead, no matter how small it is, to --threads=1. How's GIT_USE_THREADS variable for testing purposes? Threaded grep can share the same variable if you also like to avoid threading machinery in git grep --threads=1.
-- Duy