2009/08/03 Linux Kernel Podcast
Audio: http://media.libsyn.com/media/jcm/linux_kernel_podcast_20090803.mp3
For Monday, August 3rd, 2009, I’m Jon Masters with a summary of today’s LKML traffic.
In today’s issue: Cacheing get_current() and get_thread_info(), kfifo, KSM, Tracing, userspace DMA, and a standard VME implementation.
Cacheing get_current() and get_thread_info() values. Linus Torvalds, upon examining some of the assembly code generated for recent kernel compiles (in particular the accessor code to read these values) decided that it was long since time to provide some form of cacheing of these values. So, Linus being Linus, he hacked up a new version of percpu_read called percpu_read_stable. The former will continue to generate code accessing the percpu variable every time it is used to retreive one of these thread related information objects, whereas the latter “stable” version allows the value to be cached if the compiler and assembler can arrange for that to be the case.
kfifo. Stefani Seibold posted an RFC patch series implementing a new “generic kernel FIFO implementation”, known as “kfifo”. According to Stefani, the current kernel FIFO API is not very widely used because it has too many constraints (there are only 13 files using it in 2.6.30 according to Stefani). Stefani views FIFOs as a kind of basic type akin to a list and so wants to remove the constraints (such as requiring a lock whether additional locking is needed or not). He implements kfifo_alloc, kfifo_free, kfifo_reset, and so forth, all using the struct kfifo type. For further information see the original list posting, or the inevitable Linux Weekly News coverage.
KSM. Kernel Shared Memory allows one to scan physical pages of memory and reconcile identical copies of data as copy on write pages. It is especially useful for virtual machines, where two independent machine images would not otherwise automatically share data pages that happened to be identical. A lot of work has recently gone into KSM, especially for obvious KVM uses. This year’s Linux Symposium featured a presentation from Andrea Arcangeli on the subject in fact. Meanwhile, Hugh Dickins has been cleaning up KSM for 2.6.32 and has posted a series of updates that he would like to apply both for the upcoming merge window, and also into Andrew’s mm-of-the-moment (mmotm). These include a number of fixes (including an endless OOM loop) and the removal of the VM_MERGEABLE_FLAGS, as well as additional tunables and documentation.
Tracing. Lai Jiangshan posted an RFC patch modification to the crash utility in order to allow it to read in-flight kernel trace buffers captured from the crash dump image. This allows tracing to, quote “act as a flight recorder” in preserving the buffers post-mortum. The work was well received by Christoph Hellwig who described it as “Nice!” (high praise indeed!). Christoph also took the opportunity to suggest that the impressive “CC” list suggested it is time for a linux-trace mailing list. Your author was greatful as always to be on the CC, although I do make an effort to read most mails send to the LKML
Userspace DMA. Leon Woestenberg mailed to ask whether it was acceptable to have a PCI device DMA-read from pages that belong to a file mmap()ed by userspace, why get_user_pages() might fail in the process of allocating, and what one should do in general when fewer pages are returned that requested. He wants to implement a userspace scatter-gather buffer and DMA directly into it without having an in-kernel copy operation (or splice perhaps). Hugh Dickens responded that it was appropriate to DMA into userspace directly, and that the general idea was right (including example code) although perhaps Leon is having a low-memory situation in userspace, lack of appropriate permissions, or has not setup the mmap size correctly.
VME. Greg Kroah-Hartman posted a 5 part patch series on behalf of Martyn Welch, who had implemented VME Bus support for the staging tree. Apparently, Martyn has been working with the three different existing implementations of VME support on Linux systems to merge them into a single official one. He sought out and received all the appropriate legal agreements in the process – good job there to Martyn and thanks to Greg for assisting in that effort.
In today’s miscellaneous items: a patch to pin kern mounts as writable (Dave Hansen), an XFS status update for July (Christoph Hellwig) containing little in the way of changes aside from some bug fixes, some wireless updates (John Linville), a patch dropping superfluous casts in nr_free_pages() callers from Geert Uytterhoeven (who I’d obviously forgotten was at Sony these days), a dialogue between Peter Zijlstra and Sherif Fadel concerning the latter’s desire to somehow treat a processor as a “scheduling co-processor” and have the scheduler treat it specially (for which Peter suggest the fix was to “write code”), some questions about whether Linux is booting on certain AMD Geode processors (specifically the SCx200 and LX800) – according to Martin-Eric Racine it has not been booting since 2.6.23 and 2.6.31-rc4 respectively on those Geode CPUs, a request from Ranjith Kannikara for help in decoding ext3 filesystems for some kind of (academic?) foresenic recovery project in progress, version 3 of a patch implementing avoidence of access to holes in vmalloc on reading from /proc/kcore (which had been causing crashes) from Kamezawa Hiroyuki, a patch to make block2mtd work with block devices larger than 4GB in size (Tobias Diedrich), a discussion surrounding the addition of a new scanning feature in MMC to detect which cards a controller supports in place of the existing scanning code (in which outgoing maintainer Pierre Ossman uses the line ‘Linux patches generally need to provide the answer to “Why?”, not just be able to avoid “Why not?”), generic support for ACPI ALS and other ALS devices (Zhang Rui), a trivial fix to kvm_init removing the debugfs entries if the architectural initialization fails, and a patch to scripts/get_maintainer.pl adding optional “git blame” checking of patches (Joe Perches).
Finally today. John Hawley repeated once again the fact that he (and other kernel.org folks also) are well aware that the code generating the front page links is out of date – and so is not creating links to mmotm/linux-next – and that it is on his radar and will be fixed in due course, just as soon as the fallout from other stuff (the bind exploits, conferences, and so forth) has settled and he has chance to move onto this activity.
In today’s announcements: AlacrityVM hypervisor project. In a world where there are many hypervisors, one man announced the creation of yet another. The AlacrityVM is based on KVM and is targeted specifically at performance sensitive workloads such as HPC and Real Time. There is more information about the project on the developer.novell.com website. There are already two mailing lists to discuss the project – I’ll be taking a look, as I’m sure will many other Real Time folks interested in shocking virtualization hybrid setups. Separately, Greg posted some guest drivers for the new VM.
The latest kernel release is 2.6.31-rc5, which was released by Linus on Friday.
Stephen Rothwell posted a linux-next tree for August 3rd. Since Friday, the new tty maintainer trees (tty.current, and tty) for Greg Kroah-Hartman has been added, and a net gain in build failures caused Stephen to do his usual herculean effort to fix up various trees and get the compose out of the door. There are now 138 sub-trees in the linux-next tree, with the addition of the tty trees.
That’s a summary of today’s Linux Kernel Mailing List traffic, for further information visit www.kernel.org. I’m Jon Masters.

