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

Re: comparing file contents in is_exact_match?

From
Linus Torvalds <torvalds@osdl.org>
Date
Jul 17, 2006, 21:31 UTC
Message-ID
<Pine.LNX.4.64.0607171431010.2478@evo.osdl.org>
In-Reply-To
<1F90D448-5347-4CEB-80DE-3CC86C1CC16F@adacore.com>
On Mon, 17 Jul 2006, Geert Bosch wrote:
Show 6 quoted lines
> 
> Or we can avoid doing an mmap of the entire pack file, and instead
> try to be somewhat smart on limiting the size of the mmap's.
> This might be sufficient to help Windows and also solve the
> issue of finding contiguous address space for large packs on
> 32-bit systems.

Well, the thing is, you really _do_ want to mmap as much as possible of the pack-file as possible, if mmap() works.

So even with large pack-files, you do want to mmap a huge chunk at a time, even if it turns out that you only need a very small part of it.

For example, the commit data is at the very beginning of the pack-file, so if you only look at the history, you only look at a very small part of the pack-file, but you should not have to know how much you'll need ahead of time, so you'd still want the pack-file operations to act in a way that is efficient for the general case (which is to mmap as much as possible).

So yes, we'll need to have some chunking layer at some point (when people have gigabyte pack-files) but I think that's a totally separate issue from the fact that we _do_ actually want mmap() (the _real_ kind of mmap) for pack-files.

			Linus
Previous: Geert BoschNext: Yakov Lerner
Message 21 of 32 in “comparing file contents in is_exact_match?”
  1. Martin WaitzJul 6, 2006
  2. Junio C HamanoJul 6, 2006
  3. Martin WaitzJul 6, 2006
  4. Junio C HamanoJul 6, 2006
  5. Martin WaitzJul 6, 2006
  6. Martin WaitzJul 6, 2006
  7. Florian WeimerJul 7, 2006
  8. Johannes SchindelinJul 8, 2006
  9. Florian WeimerJul 16, 2006
  10. Johannes SchindelinJul 16, 2006
  11. Yakov LernerJul 16, 2006
  12. Alex RiesenJul 16, 2006
  13. Florian WeimerJul 17, 2006
  14. Johannes SchindelinJul 17, 2006
  15. Linus TorvaldsJul 17, 2006
  16. Johannes SchindelinJul 17, 2006
  17. Linus TorvaldsJul 17, 2006
  18. Martin WaitzJul 17, 2006
  19. Alex RiesenJul 17, 2006
  20. Geert BoschJul 17, 2006
  21. Linus TorvaldsJul 17, 2006
  22. Yakov LernerJul 18, 2006
  23. Johannes SchindelinJul 18, 2006
  24. Linus TorvaldsJul 18, 2006
  25. Alex RiesenJul 18, 2006
  26. Juergen RuehleJul 17, 2006
  27. Johannes SchindelinJul 17, 2006
  28. Juergen RuehleJul 17, 2006
  29. Yakov LernerJul 17, 2006
  30. Juergen RuehleJul 17, 2006
  31. Yakov LernerJul 18, 2006
  32. Yakov LernerJul 17, 2006

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.