{
  "id": 15882197,
  "title": "Linux 7.4 To Close Files Synchronously For close_range, exec & exit",
  "url": "https://urgent.news/2026/10/21/linux-7-4-to-close-files-synchronously-for-close-range-exec-exit",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-21T11:55:42.000Z",
  "source": {
    "name": "Phoronix",
    "slug": "phoronix",
    "url": "https://www.phoronix.com/news/Linux-7.4-Sync-Close-Files"
  },
  "original_language": "en",
  "account": "Linux 7.4 will close files synchronously for close_range(), exec, and exit. This change, based on the vfs-7.4-rc1.close_range tag, adds a task work queue to handle the final __fput() of an exiting task. The process involves a cmpxchg() and a TIF_NOTIFY_RESUME test-and-set per file, plus a search under pi_lock for any subsequent task_work_cancel(). Additionally, close_files(), close_range(), and close-on-exec now flush and put each file inline, similar to the behavior of the close(2) system call.\n\nThe modification offers performance improvements, reducing the time to close files with 16-21% or 40-150 ns per closed file, with the largest impact occurring when a task has 1M descriptors. Even with eight processes terminating 65,536 descriptors simultaneously, the difference remains at 16-21%. However, when 32 or 64 processes are involved, the kernels become bound by pushing millions of files through slab and rcu, resulting in a reduced difference of only 4-8%.\n\nCertain file types, such as eventfds, pipes, and AF_UNIX sockets, experience a smaller gain of 13%, 11%, and 6% respectively. The close(2) system call remains unaffected, and the performance improvement is within 2%. Michael Larabel, the principal author of Phoronix.com, is the lead developer behind the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software.",
  "summary": "Of the many VFS changes to be merged for Linux 7.4 is now closing files synchrously for close_range, exec, and exit calls. In turn when needing to close many file descriptors this provides for much lower latency than the status quo...",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}