New Features in Linux Kernel 3.6
The new kernel offers a hybrid standby feature, can cut off the power to PCIe chips and includes a new framework for userspace drivers. Other new features include security improvements for the temp directory as well as quota and backup features for Btrfs.
It took ten weeks for Linus Torvalds and his fellow developers to complete the now released Linux version 3.6. The new version, named “Terrified Chipmunk“, offers a whole range of new features both for home users and professional system administrators.
The new “Suspend to Both” feature will give Linux 3.6 hybrid standby capability. Mac OS X and Windows have offered such a feature for some time; it involves having the computer store its memory contents both in RAM and on the system disk during hibernation. A system that hibernates this way will usually wake up within a few seconds as if waking up from Suspend-to-RAM (ACPI S3); however, if power was disrupted during hibernation, for instance because a notebook ran out of battery, the system will restore the main memory contents from disk as it would after Suspend-to-Disk (Hibernate). In a short test on a slightly older system with a 250GB hard disk, Suspend-to-Both worked as intended; it required about 16 seconds to go to sleep – four times as long as with Suspend-to-RAM and about as long as is needed for Suspend-to-Disk.
The still experimental Btrfs filesystem now supports quotas for subvolumes (separate areas within the filesystem), setting out how much space they are permitted to occupy (1, 2 and others). A further new feature in Btrfs is “send/receive” (1 and others). This enables userspace programs to determine the difference between two snapshots, to save these differences to a file and to restore these backups as required. This is particularly useful for incremental, atomic backups. A more detailed explanation of this function, which is also available in ZFS, can be found in this LWN.net article.
One of the new functions implemented in Linux 3.6 is based on an idea that dates back to 1996 – the kernel can now be configured to not follow hardlinks and softlinks in directories with a set “sticky” bit (such as /tmp/), when those links point somewhere higher up the directory tree. As LWN.net explains in this article, this feature, which can be activated via sysctl, puts a stop to a common trick used by attackers to escalate their privileges by using background services running as root.
A new interface allows userspace programs to notify the kernel when the size of a partition they are using changes, allowing the kernel to become aware of changes to the size of mounted or other partitions at runtime and to act accordingly. The program resizepart, which will make use of this new interface, has been included in the recently released second pre-release version of util-linux 2.22-rc2.
Changes to the software RAID code in the MD subsystem should improve the performance of RAID arrays in which one or all of the storage devices are SSDs. The kernel developers merged the fabric driver tcm_vhost, which is classified as staging, but is not living in the staging tree of the kernel. It allows SCSI devices on a host system to be used with minimum overhead by guest systems virtualised using KVM.
KVM now includes various modifications which reduce the workload for interrupt handling and therefore enhance performance (1, 2, 3). Another addition to the kernel is IOMMU Groups, which improve the isolation of PCI and PCIe devices using I/O virtualisation technologies such as AMD-Vi and Intel’s VT-d. The IOMMU Groups feature is also the basis for the VFIO (Virtual Function I/O) userspace driver framework (1, 2, 3); mainly intended for KVM, this feature is designed to pass through PCI and PCIe devices to guests, allowing them to access these devices at low latency and high data throughput levels, and without any risk to the host. Details on VFIO are available in the documentation and in an article on LWN.net. Extensions to provide VFIO via QEMU are still in development.
The TCP Small Queues (TSQ) feature makes Linux 3.6 use small buffers of no more than 128KB per network socket by default. Like various other recent kernel modifications, this measure is designed to avoid bufferbloat – a term used for problems such as high network latencies and disrupted connections caused by too much buffering during data transfers. According to test results provided by the responsible developer, the smaller buffers per socket don’t affect data throughput; if required, administrators can use the /proc/sys/net/ipv4/tcp_limit_output_bytes proc file to adjust the value at runtime.
The kernel now includes client-side support for TCP Fast Open (TFO) (1, 2, 3, 4, 5); server-side support is planned to follow in Linux 3.7. TFO is an experimental TCP extension that has not yet been approved by the Internet Assigned Numbers Authority (IANA). It is designed to reduce the overhead when establishing a connection, which is supposed to speed up HTTP connections.
The kernel developers have merged a range of additions and bug fixes into Linux 3.6 aimed at improving support for Apple MacBook laptops released in July (such as the MacBook Pro Retina). Not all of the additions required for the new MacBooks have yet found their way into Linux 3.6. In addition, on some models, this version still shows problems during initialisation or use of the graphics hardware.
The Radeon graphics driver now activates the fastest PCIe 2.0 transfer modes where these are supported by the hardware. The audio drivers now support Intel’s Haswell processors and associated Lynx Point platform controller hubs (PCHs), which Intel appears to be planning on releasing over the next year (1, 2). A driver for Lenovo’s ThinkPad USB keyboard with trackpoint has been merged into the input subsystem.
The bnx2x driver, which handles various Ethernet chips from Broadcom, now supports the Energy-Efficient Ethernet (EEE) standard that is specified in IEEE 802.3az. Users can read or set EEE parameters via the recently released ethtool 3.5.
Summing up 3.6
Btrfs has taken another step forward, and Linux is finally offering proper hybrid standby support. Some system administrators will be pleased about the new interfaces for the resizepart tool because they allow existing partitions to be resized without the need to reboot the system. Security improvements for soft and hard links have finally fixed a much-exploited attack vector.
Kernel trends: Outlook on 3.7
Directly following the release of Linux 3.6, the first, usually two-week long, merge window of the Linux kernel development cycle commences, during which the kernel developers incorporate the many changes for the next version of the kernel into the main development branch. Numerous changes have already been prepared for this first phase of the next development cycle.
Among the components that are ready for integration is a major revision of the Intel graphics driver that updates the code for setting screen modes. The developers are also working on a major overhaul of the Nouveau driver – although it is currently uncertain whether this code will be integrated into Linux 3.7. The same is true for the Aarch64 64-bit ARM architecture; LWN.net recently released an article about a discussion that provides an overview of the project’s code development status.
As usual, the Kernel Log will summarise these and other developments in the Linux kernel field – including new point releases of the stable kernel series (3.6.y), which should, over the next few weeks, fix a few bugs that testers missed during development or which hackers could not fix in time for the release of Linux 3.6. The Kernel Log in The H Open will, as usual, be reporting on the major changes integrated into the next kernel version in a “Coming in 3.7” mini-series. A release of 3.7 in late November or early December seems likely at this point in time. A detailed summary of the major changes in 3.7 will then be published on The H Open in a Kernel Log like this one.
Facts and figures for the latest versions of the Linux kernel
|69||9542||9133 files changed,
|65||10268||10985 files changed,
|64||9153||7946 files changed,
|94||8692||9181 files changed,
|73||11881||12608 files changed,
|74||10550||10698 files changed,
|63||10899||11086 files changed,
|62||10957||9631 files changed,
|71||10247||8296 files changed,
|¹ find . -type f -not -regex ‘\./\.git/.*’ | wc -l
² find . -type f -not -regex ‘\./\.git.*’ | xargs cat | wc -l (find . -name *.[hcS] -not -regex ‘\./\.git.*’ | xargs cat | wc -l)
³ git-log –no-merges –pretty=oneline v3.(x-1)..v3.(x) | wc -l
⁴ git diff –shortstat v3.(x-1)..v3.(x)
Linux 3.6 download
The source code is offered as tar archive compressed with Gzip, Bzip2, or XZ. The authenticity of the uncompressed tarball can be verified with a signature file that is shipped alongside it – for example, the process for Linux 3.1 would be performed with commands such as these:
[thl@thl tmp]$ wget --quiet \ http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.1.tar.sign \ http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.1.tar.xz [thl@thl tmp]$ xz -d linux-3.1.tar.xz [thl@thl tmp]$ gpg --verify linux-3.1.tar.sign gpg: Signature made Mon Oct 24 09:17:58 2011 CEST using RSA key ID 00411886 gpg: Good signature from "Linus Torvalds <email@example.com>" gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: ABAF 11C6 5A29 70B1 30AB E3C4 79BE 3E43 0041 1886
Further background information about the developments in the Linux kernel area can be found using the search function at The H Open Source. Information about previous Linux kernel releases can be found in The H’s Linux Kernel History