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

Re: [PATCH 0/2] A new merge algorithm, take 3

From
CLChuck Lever <cel@citi.umich.edu>
Date
Sep 8, 2005, 18:58 UTC
Message-ID
<432089D8.4060507@citi.umich.edu>
In-Reply-To
<Pine.LNX.4.58.0509081131070.5940@g5.osdl.org>
Linus Torvalds wrote:
Show 15 quoted lines
> 
> On Thu, 8 Sep 2005, Chuck Lever wrote:
> 
>>in my case the merges were taking significantly longer than a half 
>>second.  making this change is certainly not worth it if merges are 
>>running fast...
> 
> 
> Note that in cold-cache cases, all the expense of read-tree is in actually
> reading the tree objects themselves (a kernel tree has more than a
> thousand subdirectories). Also, a full "git pull" will do the diffstat 
> etc, and then the expense ends up being in the actual "git diff" part.
> 
> So read-tree itself may be half a second, but a merge ends up having other 
> parts.
i measured this using the following test...

i have a linux kernel git repository under control of stgit and it has about 70 patches in it. i did an "stg status" to heat the page cache. i popped all the patches, then did an "stg pull origin".

i started oprofile, and did an "stg push -a".  it took about 9 minutes.

i stopped oprofile and looked at the results. roughly 65% of the total CPU time was spent in libc:memmove. after instrumenting git, i determined that in the "stg push" case the critical memmove was the one in add_cache_entry.

note that i'm not saying that the 9 minutes of wall clock time was entirely due to CPU... catalin has been steadily improving "stg push" so this time has shortened by more than half, recently. but i do notice that working in a kernel repository is significantly slower than working in my git or stgit source repositories, which are smaller by far. the small repositories behave just as i expect, the tools respond quite snappily.

Show 11 quoted lines
>>they are still read-only with my linked list implementation.
> 
> Btw, in the sparse project, we have this really smart "pointer list" data
> structure, which is extremely space- and time-efficient. It ends up
> _looking_ like a linked list, but it batches things up in hunks of 29
> entries (29 pointers plus overhead gives you blocks of 32 longwords, which
> is the allocation size) and thus gives basically a cache-friendly
> doubly-linked list. It knows how to do insertions, traversals etc very 
> efficiently.
> 
> Any interest?

i'm not married to splay trees. i think we should explore several different data structures before picking one, and this one sounds reasonable to try.

begin:vcard fn:Chuck Lever n:Lever;Charles org:Network Appliance, Incorporated;Linux NFS Client Development adr:535 West William Street, Suite 3100;;Center for Information Technology Integration;Ann Arbor;MI;48103-4943;USA email;internet:cel@citi.umich.edu title:Member of Technical Staff tel;work:+1 734 763-4415 tel;fax:+1 734 763 4434 tel;home:+1 734 668-1089 x-mozilla-html:FALSE url:http://www.monkey.org/~cel/ version:2.1 end:vcard

Previous: Linus TorvaldsNext: Linus Torvalds
Message 30 of 40 in “A new merge algorithm, take 3”
  1. 0/2 A new merge algorithm, take 3Fredrik Kuivinen, Sep 7, 2005
  2. 1/2 Add '-i' flag to read-tree to make it ignore whats in the working directory.Fredrik Kuivinen, Sep 7, 2005
  3. Unified merge driver pushed out to "master" branchJunio C Hamano, Sep 11, 2005
  4. Fredrik KuivinenSep 11, 2005
  5. Junio C HamanoSep 12, 2005
  6. Another merge test case from the kernel tree.Junio C Hamano, Sep 14, 2005
  7. Daniel BarkalowSep 14, 2005
  8. Junio C HamanoSep 14, 2005
  9. Fredrik KuivinenSep 14, 2005
  10. Junio C HamanoSep 14, 2005
  11. Yet another set of merge test cases from the kernel tree.Junio C Hamano, Sep 15, 2005
  12. Fredrik KuivinenSep 19, 2005
  13. Junio C HamanoSep 20, 2005
  14. Fredrik KuivinenSep 20, 2005
  15. 2/2 A new merge algorithmFredrik Kuivinen, Sep 7, 2005
  16. Daniel BarkalowSep 7, 2005
  17. Fredrik KuivinenSep 8, 2005
  18. Daniel BarkalowSep 8, 2005
  19. Fredrik KuivinenSep 8, 2005
  20. Daniel BarkalowSep 8, 2005
  21. Junio C HamanoSep 7, 2005
  22. Junio C HamanoSep 8, 2005
  23. A Large Angry SCMSep 8, 2005
  24. Chuck LeverSep 8, 2005
  25. Junio C HamanoSep 8, 2005
  26. Linus TorvaldsSep 8, 2005
  27. Junio C HamanoSep 8, 2005
  28. Chuck LeverSep 8, 2005
  29. Linus TorvaldsSep 8, 2005
  30. Chuck LeverSep 8, 2005
  31. Linus TorvaldsSep 8, 2005
  32. [RFH] Merge driverJunio C Hamano, Sep 9, 2005
  33. Daniel BarkalowSep 9, 2005
  34. Junio C HamanoSep 9, 2005
  35. Daniel BarkalowSep 9, 2005
  36. [RFH] Merge driverJunio C Hamano, Sep 11, 2005
  37. Fredrik KuivinenSep 12, 2005
  38. Junio C HamanoSep 12, 2005
  39. Fredrik KuivinenSep 13, 2005
  40. Junio C HamanoSep 13, 2005

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.