In association with heise online

12 February 2010, 15:51

Kernel Log: Coming in 2.6.33 (Part 4) - Architecture and virtualisation

  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit

Kernel Log Logo by Thorsten Leemhuis

Several changes to the X86 and KVM code are to speed up the kernel's own hypervisor. The kernel developers once again revised and considerably extended the still emerging tracing infrastructure. The Power and PowerPC code now also supports the Gamecube and Wii games consoles.

When releasing Linux 2.6.33-rc7 at the end of last week, Linus Torvalds expressed some dissatisfaction because the main development branch currently contains more flaws than he would like. He asked the developers to take another close look at the list of known bugs in the predecessor of 2.6.33 and indicated that he will probably release an eighth RC before finalising Linux 2.6.33.

The Kernel Log takes this opportunity to continue its report about the advancements of Linux 2.6.33, discussing what's new in terms of architecture support, kernel infrastructure, tracing and virtualisation in the following fourth part of the "Coming in 2.6.33" mini series. The first, second and third part of this series covered the most important changes concerning network support, file systems, the storage subsystem and graphics hardware.

Virtualisation

Numerous improvements have been made to the KVM (Kernel-based Virtual Machine) virtualisation solution, which is mainly developed by Red Hat. Some of these, for instance, have improved the kernel hypervisor's interaction with the Cpufreq framework responsible for changing the clock speed of modern processors. Various other changes to the KVM code, in combination with X86 code modifications, are to reduce the management effort required for context switches, which is designed to improve performance (1, 2). KVM no longer blocks the virtualisation functions of modern CPUs unless it actually needs them; this allows other virtualisation solutions to work without first having to unload the KVM's kernel modules when KVM is inactive. The KVM developers also improved the operation of paravirtualised Xen guest systems under Xen. Furthermore, the kernel can now shift memory areas that have been merged by the KSM (Kernel Shared Memory) feature, which was created in the KVM area and introduced in Linux 2.6.32, into swap memory if required.

Mainly developed by Novell, the KVM-related AlacrityVM hypervisor, designed specifically for High Performance Computing (HPC) and real-time applications, was submitted for inclusion in 2.6.33 but didn't make it, just like the distributed Ceph file system. According to Torvalds, this was both because of time issues and because too few of the kernel developers and distributors appear to have advocated it; several kernel hackers had previously accused the AlacrityVM developers of insufficient cooperation with the developers of the KVM project, sparking protracted discussions; an article on LWN.net summarises the respective background information.

Tracing

The developers have made further changes to the tracing infrastructure around Ftrace and to the performance events previously called performance counters (1, 2, 3). The new "kprobe-based event tracer" allows probe points to be added to almost any kernel area at run-time (documentation); users can access this infrastructure via the "perf" program, which is included in Linux and offers a new "probe" subcommand. Details of a previous developer version of the now added code can be found in an article released on LWN.net last summer. LWN.net also offers three articles by Steven Rostedt describing the Linux kernel's tracing options, which he co-developed – the most recent of them was released in January and explains several advanced uses of the tracing infrastructure, but it also contains references to two earlier articles describing the basics.

Several kernel changes allow processes to be monitored simultaneously or improve Big Kernel Lock (BKL) diagnostics. The analysed data can now be filtered via regular expressions; the kernel developers have also extended the Perf command's Perl script support (for example 1, 2, 3, documentation). Its "bench" subcommand, which is new in 2.6.33, offers several speed measuring functions (for example 1 2, 3, 4, documentation).

New are also Perf's "kmem" and "diff" subcommands as well as kernel module support improvements.

Linux on the Gamecube and Wii

The architecture code for Power and PowerPC CPUs now supports Nintendo's GameCube and Wii games consoles (for example 1, 2); further details can be found on the GC Linux project's web page, and via the commit links at the end of this article.

ARM, MIPS and x86 systems now allow the kernel and initial ramdisk (initrd) to be compressed via LZO; the commit comment states that, while LZO doesn't compress as efficiently as Gzip, it can be decompressed considerably faster on ARM systems (1, 2, 3, 4, 5). The ARM developers have integrated a large number of further improvements for dozens of different systems with ARM CPUs or ARM cores; one new addition, for example, supports the Dove (88AP510) SOC (System-on-a-Chip) made by Marvell. Not only the code for ARM hardware, but also that for other architectures has been extended to support new processors and systems even die-hard Linux fans may not have heard about – the MIPS code, for instance, will from now on support Cisco's MIPS 24Kc-based "Powertv cable settop box". Also new is the code to support the Loongson 2F.

The real-time developers made numerous changes to further reduce the use of the Big Kernel Lock (BKL). Currently inconsequential for users is a major renaming of the spinlocks used for locking critical internal kernel areas. These locking mechanisms, which work with active waiting and must not be interrupted, are now called arch_spinlock_t. The restructuring measures make the Linux real-time developers' job a lot easier and forms the basis for moving the "sleeping spinlocks" from the Realtime/RT tree into the official Linux kernel. They also make it possible to interrupt the majority of the spinlocks that have so far used active waiting to gain exclusive access to shared data structures in the fastest possible way – this is the last major component for proper real-time functionality still missing in the official Linux kernel. Details about the renaming measures can be found in a short message on LWN.net; two older articles provide more information about sleeping spinlocks and the RT tree's current state of development (1, 2).

ACPI, PCI and power management

In future, Sysfs files will show whether the BIOS is using ACPI to block the switch to maximum CPU frequency in certain device modes. Furthermore, Rafael J. Wysocki had submitted several patches that in certain devices make the kernel suspend or resume in parallel instead of sequentially when switching into or out of standby. This is intended to speed up suspending and resuming. Linus Torvalds, however, rejected the changes rather unequivocally; details about this and the patches can be found in an article on LWN.net. As a result, Wysocki has put the changes on hold and submitted several patches which, for instance, offer run-time improvements to the power saving infrastructure for I/O devices, which was reworked in 2.6.32. However, Wysocki has since readjusted the "asynchronous suspend and resume" code and is likely to resubmit it for 2.6.34.

In brief

Minor gems

Many further minor, but by no means insignificant, changes can be found in the list below, which contains the commit headers referring to the respective change. Like many of the references in the text above, the links point to the relevant commit in the web front end of the Git branch for the kernel sources maintained by Linus Torvalds at kernel.org. The commit comments and the patches themselves provide extensive further information on the respective changes.

Crypto and Security

Memory Management

ACPI and PCI

Power Management

Scheduler

Tracing

Virtualization

Architecture Support

X86

ARM

Power

Others

For other articles on 2.6.33 and links to the rest of the "Coming in 2.6.33 " series, see The H's Kernel Log - 2.6.33 Tracking page. New editions of Kernel Logs are also mentioned on Identi.ca and Twitter via "@kernellog2". The Kernel Log author also posts updates about various topics on Identi.ca and Twitter via "@kernellogauthor".

(thl)

(crve)

Print Version | Send by email | Permalink: http://h-online.com/-929402
 


  • July's Community Calendar





The H Open

The H Security

The H Developer

The H Internet Toolkit