git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Thomas RastNext: Ramsay Jones
Message 7 of 9 in “Multithread index-pack”
  1. 0/2 Multithread index-packNguyễn Thái Ngọc Duy, Mar 12, 2012
  2. 1/2 index-pack: split second pass obj handling into own functionNguyễn Thái Ngọc Duy, Mar 12, 2012
  3. 2/2 index-pack: support multithreaded delta resolvingNguyễn Thái Ngọc Duy, Mar 12, 2012
  4. Thomas RastMar 12, 2012
  5. Nguyen Thai Ngoc DuyMar 12, 2012
  6. Thomas RastMar 12, 2012
  7. Nguyen Thai Ngoc DuyMar 12, 2012
  8. Ramsay JonesMar 13, 2012
  9. Nguyen Thai Ngoc DuyMar 14, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.