hn.today

Linus Torvalds' AI Code Improved: Performance Wins with Reworked Code

phoronix.com6 points0 comments
Screenshot of Linus Torvalds' AI Code Improved: Performance Wins with Reworked Code

Linus Torvalds’ AI-assisted kernel idea has been reworked into a concrete patch series that eliminates folio reference taking for small, multi-threaded reads from the page cache. The change lets filemap_read() and shmem copy data directly from page cache pages without incrementing folio refcounts; instead, folios that such readers might access are only freed after an RCU grace period. That removes the frequent refcount bouncing that occurs when many CPUs repeatedly take and drop references on the same folio, reducing contention and overhead in workloads dominated by many small reads from a single file.

Meta engineer Kiryl Shutsemau tested the reworked code across EXT4, TMPFS, XFS and a raw block device using 64 threads on an AMD Ryzen Threadripper, with and without default CPU security mitigations enabled. The benchmarks show very large performance gains for the targeted workloads. The patch series is currently an RFC with some design details still open, but it demonstrates practical, measurable improvements over the existing approach and is posted for review on the kernel mailing lists as work toward upstream inclusion.

Read on phoronix.com0 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Security

OpenBSD 8.0

OpenBSD 8.0

OpenBSD 8.0 was released on October 20, 2026, introducing platform-specific improvements such as increased kernel virtual address space for amd64 and added support for features like hibernate on arm64. The update also includes various kernel enhancements, bug fixes, and architecture support updates across multiple platforms. (openbsd.org)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.