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

Re: [PATCH/RFC 1/2] sha1_file: close all pack files after running

From
Max Kirillov <max@max630.net>
Date
Oct 2, 2015, 20:06 UTC
Message-ID
<20151002200649.GE26154@wheezy.local>
In-Reply-To
<20151002190646.GC26154@wheezy.local>
On Fri, Oct 02, 2015 at 10:06:46PM +0300, Max Kirillov wrote:
> for i in $(seq 1000)
> t_git -c core.packedGitWindowSize=100 log

It was 32-bit build. I cannot promise those exactly numbers will work, because I don not clearly understand what do they mean. With 100 commits the pack size was 20K, but it was mapped fully with the window=100.

But I believe with the same build same numbers should reproduce the issue.

For 32-bit builds I can see it on any significantly big repository, like the git itself. Maybe for 64bit it is less likely.

The code which decides whether to close the pack is in use_pack() in sha1_file.c:
-----------
                        if (!win->offset && win->len == p->pack_size
                                && !p->do_not_close) {
                                close(p->pack_fd);
                                pack_open_fds--;
                                p->pack_fd = -1;
                        }
-----------
Previous: Max KirillovNext: Max Kirillov
Message 10 of 12 in “close packs files when they are not needed”
  1. 0/2 close packs files when they are not neededMax Kirillov, Oct 1, 2015
  2. 1/2 sha1_file: close all pack files after runningMax Kirillov, Oct 1, 2015
  3. Johannes SchindelinOct 2, 2015
  4. Johannes SchindelinOct 2, 2015
  5. Max KirillovOct 2, 2015
  6. Johannes SchindelinOct 4, 2015
  7. Max KirillovOct 5, 2015
  8. Johannes SchindelinOct 5, 2015
  9. Max KirillovOct 2, 2015
  10. Max KirillovOct 2, 2015
  11. 2/2 sha1_file: set packfile to O_CLOEXEC at openMax Kirillov, Oct 1, 2015
  12. Johannes SchindelinOct 2, 2015

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.