Linus Torvalds Builds a Kernel Patch with Claude Code: Significant Gains, Branch-Only for Now
Linus Torvalds pushed a kernel branch named noref-filemap-read-with-llm that reads the page cache without folio references, aimed at small-read contention from many threads. Per his patch message, Claude Code produced the code, test programs, review, and first draft of the cover letter under his direction, while he ran the measurements on his machine. Phoronix reports a significant performance impact; the patches are branch-only and may or may not land in the Linux 7.4 merge window. Task: Suggested implementation: Use Claude Code to draft kernel patches for specific contention issues, such as folio reference counting. The agent generates code, test programs, and documentation drafts under human direction. The human expert reviews the output and runs performance measurements on their own machine to validate correctness and impact.; tools: Claude Code. Human role: Linus Torvalds directed the work, ran the measurements, and credited Claude Code for producing the code, test programs, and review.; limitations: Source reliability is low due to a 403 error and lack of independent verification. Prerequisites include deep kernel expertise to direct the AI and validate its output. Integration uncertainty is high; patches may remain in experimental branches. Human approval is mandatory before any code is considered for production..
Tools
Published on Agent Work Atlas:
Overview
Linus Torvalds pushed a kernel branch named noref-filemap-read-with-llm that reads the page cache without folio references, aimed at small-read contention from many threads. Per his patch message, Claude Code produced the code, test programs, review, and first draft of the cover letter under his direction, while he ran the measurements on his machine. Phoronix reports a significant performance impact; the patches are branch-only and may or may not land in the Linux 7.4 merge window.
Workflow
Suggested implementation: Use Claude Code to draft kernel patches for specific contention issues, such as folio reference counting. The agent generates code, test programs, and documentation drafts under human direction. The human expert reviews the output and runs performance measurements on their own machine to validate correctness and impact.
Reported result
Outcomes are unverified as the source is inaccessible (HTTP 403). No independent confirmation of performance gains or merge status exists. A measurable acceptance check would be: 'Does the proposed patch reduce contention latency in a controlled benchmark compared to the baseline?'
Human role
Linus Torvalds directed the work, ran the measurements, and credited Claude Code for producing the code, test programs, and review.
Limitations
Source reliability is low due to a 403 error and lack of independent verification. Prerequisites include deep kernel expertise to direct the AI and validate its output. Integration uncertainty is high; patches may remain in experimental branches. Human approval is mandatory before any code is considered for production.
Try it
Act as a senior kernel developer. I need to address small-read contention on folio reference counting in the Linux kernel. Use Claude Code to draft a patch series for the [replaceable: specific subsystem/file] module. Inputs: [replaceable: current code snippet], [replaceable: benchmark script]. Steps: 1. Analyze the contention point. 2. Generate code changes to remove folio references for read paths. 3. Write a test program to simulate multi-threaded small reads. 4. Draft a cover letter explaining the change. Output: A git patch series and a markdown report. Quality check: Ensure the code compiles and the test script runs without errors. Do not apply changes to the main branch. First, perform a dry run on a sample file [replaceable: sample_file.c] and wait for my confirmation before proceeding with the full implementation.
Source reports are not independently verified. Publication date is the catalog publication date, not the original article date.