News: 0001519743

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Linux 6.14 To Perform Better With The Drgn Debugger Via Faster /proc/kcore Reads

([Linux Kernel] 116 Minutes Ago Faster /proc/kcore Reads)


Christian Brauner of Microsoft began sending out his various pull requests today of new material for the Linux 6.14 kernel in advance of the merge window expected to open next week. One of the interesting pull requests is carrying the work of Omar Sandoval for faster /proc/kcore reads that can help with debugger performance.

Back in November I originally brought up the tentative patches at the time around [1]Linux kernel optimizations for speeding-up debuggers reading /proc/kcore . That work has now crossed the finish line and has been submitted for pulling by Linus Torvalds into the Linux 6.14 kernel.

Christian Brauner explains in the pull request:

"The performance of /proc/kcore reads has been showing up as a bottleneck for the drgn debugger. drgn scripts often spend ~25% of their time in the kernel reading from /proc/kcore.

A lot of this overhead comes from silly inefficiencies. This pull request contains fixes for the low-hanging fruit. The fixes are all fairly small and straightforward. The result is a 25% improvement in read latency in micro-benchmarks (from ~235 nanoseconds to ~175) and a 15% improvement in execution time for real-world drgn scripts:

- Make /proc/kcore entry permanent.

- Avoid walking the list on every read.

- Use percpu_rw_semaphore for kclist_lock.

- Make Omar Sandoval the official maintainer for /proc/kcore."

More details via [2]this pull request .

Drgn is the programmable debugger developed by Meta that can allow using Python scripts for debugging the Linux kernel and more. More details on Drgn can be found via the [3]GitHub project site .



[1] https://www.phoronix.com/news/Linux-Faster-Dragn-proc-kcore

[2] https://lore.kernel.org/lkml/20250118-vfs-kcore-913a66eabd03@brauner/

[3] https://github.com/osandov/drgn



Type44Q

skeevy420

A Severe Strain on the Credulity
As a method of sending a missile to the higher, and even to the
highest parts of the earth's atmospheric envelope, Professor Goddard's rocket
is a practicable and therefore promising device. It is when one considers the
multiple-charge rocket as a traveler to the moon that one begins to doubt...
for after the rocket quits our air and really starts on its journey, its
flight would be neither accelerated nor maintained by the explosion of the
charges it then might have left. Professor Goddard, with his "chair" in
Clark College and countenancing of the Smithsonian Institution, does not
know the relation of action to re-action, and of the need to have something
better than a vacuum against which to react... Of course he only seems to
lack the knowledge ladled out daily in high schools.
-- New York Times Editorial, 1920