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

Re: [PATCH] meson: wire up USE_NSEC build knob

From
Jeff King <peff@peff.net>
Date
Jun 21, 2026, 17:49 UTC
Message-ID
<20260621174934.GC2206349@coredump.intra.peff.net>
In-Reply-To
<c4c5ade901ff95b0f95939ea818870e4f3d59da1.1781971201.git.ben.knoble+github@gmail.com>
On Sat, Jun 20, 2026 at 12:00:24PM -0400, D. Ben Knoble wrote:
> Autotools-style builds permit enabling USE_NSEC for cases where that's
> desired; the equivalent knob is missing from meson-based builds.

Seems reasonable. This is not changing the defaults at all, but just bringing meson's options to parity with the Makefile.

I'm not still not sure if turning on USE_NSEC is a good idea. There's some discussion in Documentation/technical/racy-git.adoc:

  With `USE_NSEC`
  compile-time option, `st_mtim.tv_nsec` and `st_ctim.tv_nsec`
  members are also compared. On Linux, this is not enabled by default
  because in-core timestamps can have finer granularity than
  on-disk timestamps, resulting in meaningless changes when an
  inode is evicted from the inode cache.  See commit 8ce13b0
  of git://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git
  ([PATCH] Sync in core time granularity with filesystems,
  2005-01-04). This patch is included in kernel 2.6.11 and newer, but
  only fixes the issue for file systems with exactly 1 ns or 1 s
  resolution. Other file systems are still broken in current Linux
  kernels (e.g. CEPH, CIFS, NTFS, UDF), see
  https://lore.kernel.org/lkml/5577240D.7020309@gmail.com/

That's the most succinct description of the problem I've seen, but I have no idea how widely it still applies. Kernel 2.6.11 is quite old now, but I could believe that other filesystems (especially network ones) still exhibit the issue.

So I guess if we wanted to go further it would take some digging as to how each platform behaves, and then flipping the config.make.uname knob for ones where it can be argued that the behavior is always reasonable.

But that's all outside the scope of your patch here.
-Peff
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 5 of 19 in “meson: wire up USE_NSEC build knob”
  1. meson: wire up USE_NSEC build knobD. Ben Knoble, Jun 20, 2026
  2. Junio C HamanoJun 21, 2026
  3. D. Ben KnobleJun 21, 2026
  4. Patrick SteinhardtJun 22, 2026
  5. Jeff KingJun 21, 2026
  6. Patrick SteinhardtJun 22, 2026
  7. Jeff KingJun 28, 2026
  8. Jeff KingJun 28, 2026
  9. brian m. carlsonJun 29, 2026
  10. Patrick SteinhardtJun 29, 2026
  11. Junio C HamanoJun 29, 2026
  12. Jeff KingJun 30, 2026
  13. D. Ben KnobleJul 3, 2026
  14. D. Ben KnobleJul 3, 2026
  15. D. Ben KnobleJul 3, 2026
  16. Patrick SteinhardtJul 6, 2026
  17. Jeff KingJul 7, 2026
  18. Junio C HamanoJul 11, 2026
  19. Ben KnobleJul 13, 2026

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.