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

Re: [PATCH v3 2/3] sha1_file: open window into packfiles with O_CLOEXEC

From
Jeff King <peff@peff.net>
Date
Oct 28, 2016, 07:51 UTC
Message-ID
<20161028075104.la24zydnr3ogb6qv@sigill.intra.peff.net>
In-Reply-To
<CA+55aFwfhFqV74s_O=GucycY9U19ysiACDqX=mK4Gf=eQ0coxQ@mail.gmail.com>
On Thu, Oct 27, 2016 at 03:38:59PM -0700, Linus Torvalds wrote:
Show 14 quoted lines
> On Thu, Oct 27, 2016 at 3:24 AM, Jeff King <peff@peff.net> wrote:
> >
> > +cc Linus as the original author of 144bde78e9 in case there is
> > something subtle I'm missing, but this really just seems like it's
> > an outdated optimization.
> 
> I'd *really* like to keep O_NOATIME if at all possible. It made a huge
> difference on older kernels, and I'm not convinced that relatime
> really fixes it as well as O_NOATIME.
> 
> There are people who don't like relatime. And even if you do have
> relatime enabled, it will update atime once every day, so then this
> makes your filesystem have a storm of nasty inode writebacks if you
> haven't touched that git repo in a while.
The existence of "relatime" is only half the story of its outdatedness.

The other half is packfiles, so that we are paying atime only once per packfile, not once per object (technically once per mmap(), so on a 32-bit system with large packfiles, it would be multiple, depending on your window size).

So I'm not convinced that "storm" is really the right word in a modern context. The atime updates due to object accesses are probably smaller than those from all the other read() calls being done on non-object files (like config, refs, etc).

That being said, if you really care, it's not that much code to keep.
-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 48 of 54 in “Use CLOEXEC to avoid fd leaks”
  1. 0/2 Use CLOEXEC to avoid fd leakslarsxschneider@gmail.com, Oct 24, 2016
  2. 1/2 sha1_file: open window into packfiles with CLOEXEClarsxschneider@gmail.com, Oct 24, 2016
  3. Johannes SchindelinOct 25, 2016
  4. Junio C HamanoOct 25, 2016
  5. 2/2 read-cache: make sure file handles are not inherited by child processeslarsxschneider@gmail.com, Oct 24, 2016
  6. Eric WongOct 24, 2016
  7. Junio C HamanoOct 24, 2016
  8. Johannes SchindelinOct 25, 2016
  9. Junio C HamanoOct 25, 2016
  10. Johannes SixtOct 24, 2016
  11. Lars SchneiderOct 24, 2016
  12. Johannes SixtOct 25, 2016
  13. Junio C HamanoOct 24, 2016
  14. Johannes SchindelinOct 25, 2016
  15. 0/3 quick reroll of Lars's git_open() w/ O_CLOEXECJunio C Hamano, Oct 25, 2016
  16. 2/3 sha1_file: open window into packfiles with O_CLOEXECJunio C Hamano, Oct 25, 2016
  17. Jeff KingOct 26, 2016
  18. Junio C HamanoOct 26, 2016
  19. Jeff KingOct 26, 2016
  20. Junio C HamanoOct 26, 2016
  21. Jeff KingOct 26, 2016
  22. Junio C HamanoOct 26, 2016
  23. Jeff KingOct 27, 2016
  24. Junio C HamanoOct 27, 2016
  25. Linus TorvaldsOct 27, 2016
  26. Junio C HamanoOct 27, 2016
  27. Linus TorvaldsOct 27, 2016
  28. Linus TorvaldsOct 27, 2016
  29. Junio C HamanoOct 27, 2016
  30. Linus TorvaldsOct 27, 2016
  31. Junio C HamanoOct 28, 2016
  32. Junio C HamanoOct 28, 2016
  33. Eric WongOct 28, 2016
  34. Johannes SchindelinOct 28, 2016
  35. Linus TorvaldsOct 28, 2016
  36. Junio C HamanoOct 28, 2016
  37. Linus TorvaldsOct 28, 2016
  38. Junio C HamanoOct 28, 2016
  39. Junio C HamanoOct 29, 2016
  40. Johannes SchindelinOct 29, 2016
  41. Linus TorvaldsOct 29, 2016
  42. Junio C HamanoOct 31, 2016
  43. Jeff KingOct 31, 2016
  44. Junio C HamanoOct 31, 2016
  45. Jeff KingOct 31, 2016
  46. Junio C HamanoOct 28, 2016
  47. Junio C HamanoOct 28, 2016
  48. Jeff KingOct 28, 2016
  49. 1/3 sha1_file: rename git_open_noatime() to git_open()Junio C Hamano, Oct 25, 2016
  50. 3/3 read-cache: make sure file handles are not inherited by child processesJunio C Hamano, Oct 25, 2016
  51. Eric WongOct 25, 2016
  52. Junio C HamanoOct 25, 2016
  53. Lars SchneiderOct 25, 2016
  54. Junio C HamanoOct 25, 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.