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

Re: fast-import's gfi_unpack_entry causes too many munmap/mmap cycles

From
Mike Hommey <mh@glandium.org>
Date
Apr 16, 2016, 11:04 UTC
Message-ID
<20160416110403.GA19197@glandium.org>
In-Reply-To
<20160416091839.GA12764@glandium.org>
On Sat, Apr 16, 2016 at 06:18:39PM +0900, Mike Hommey wrote:
Show 6 quoted lines
> And even if I am okay with that overhead, I still hit the problem again
> when using that tree later with `M 040000 $sha1 ` in the next commit,
> because that does a load_tree() for the tree sha1, after a commit having
> occurred, which touched the pack, bringing me back to square one (the
> sad part being that it does so while the tree_content for the tree in
> question is already in memory).

So, interestingly, the load_tree() doesn't happen when using `from 0000000000000000000000000000000000000000\nmerge :mark` for the commit.

That is, with:
  commit refs/foo
  committer <foo@foo> 0 +0
  data 0
  M 040000 bff3a42ecae0e7c8f707d328f9432c1ffe9644b0 ""
load_tree is called. And with:
  commit refs/foo
  committer <foo@foo> 0 +0
  data 0
  from 0000000000000000000000000000000000000000
  merge :mark_of_parent
  M 040000 bff3a42ecae0e7c8f707d328f9432c1ffe9644b0 ""
it's not called.
So I think I got myself a workaround...
Show 8 quoted lines
> A --- B
>  \
>   \-- C
> 
> I have:
> - diff between null-tree and A
> - diff between A and B
> - diff between B and C
I should be able to do:
- start the commit command for A
- before finishing it, `ls ""`
- then apply the diff for B and `ls ""`
- then apply the diff for C and `ls ""`
- then `deleteall`
- then `M 040000 sha1_from_first_ls ` and finally finish A
- create the commit for B with `from
  0000000000000000000000000000000000000000\nmerge :mark` and `M 040000
  sha1_from_second_ls`
- likewise for C
... and avoid gfi_unpack_entry.
Mike
Previous: Mike HommeyNext: Mike Hommey
Message 3 of 5 in “fast-import's gfi_unpack_entry causes too many munmap/mmap cycles”
  1. Mike HommeyApr 16, 2016
  2. Mike HommeyApr 16, 2016
  3. Mike HommeyApr 16, 2016
  4. Mike HommeyApr 17, 2016
  5. Mike HommeyApr 17, 2016

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.