Linux 3.1

Summary: Support for the OpenRISC opensource CPU, performance improvements to the writeback throttling, some speedups in the slab allocator, a new iSCSI implementation, support for Near-Field Communication chips used to enable mobile payments, bad block management in the generic software RAID layer, a new "cpupowerutils" userspace utility for power management, file system barriers enabled by default in ext3, Wii Remote controller support and new drivers and many small improvements.

1. Prominent features in the 3.1 kernel

1.1. New architecture: OpenRISC

OpenRISC is an Open Source CPU from the OpenCores project that brings to the world of hardware all the same advantages that Open Source software has known for so long. The aim of the project is to create free and open source computing platforms available under the GNU (L)GPL license, and a set of free, open source implementations of the architecture and open source software development tools, libraries, operating systems and applications. The implementation merged in this release is the 32-bit OpenRISC 1000 family (or1k). Details about the CPU can be found here

1.2. Dynamic writeback throttling

"Writeback" is the process of writing data from the RAM to the disk, and in this context throttling means blocking processes temporally to avoid them creating new data that needs to be written, until the current data has been written to the disk. The writeback code was suboptimal, because in certain situations it throttled various processes and forced them to write their data to the disk simultaneously, creating random IO patterns which are not good for performance. The new code avoids these situations and helps to create more linear IO patterns. Also, the new code tries to detect the available disk bandwidth, which is used to improve the heuristics that decide which processes should be throttled, which should lead overall to improved throughput. The writeback<->filesystems coupling has also been improved, and a SMP scaling problem has also been fixed.

1.3. File system barriers enabled by default in ext3

Hard disks have a memory buffer were they temporally store the instructions and data issued from the OS while the disk processes it. The internal software of modern disks changes the order of the instructions to improve performance, which means that instructions may or may not be committed to the disk in the same order the OS issued them. This breaks many of the assumptions that file systems need to reliably implement things like journaling or COW, so disks provide a "cache flush" instruction that the OS uses when it needs it. In the Linux world, when a file system issues that instruction, it is called a "barrier". File systems such as XFS, Btrfs and ext4 already use and enable barriers by default; ext3 supports them but until this release it did not enable them by default: while the data safety guarantees are higher, their performance impact in Ext3 is noticeable in many common workloads, and it considered that it was an unacceptable performance regression to enable them by default. However, Linux distributions like Red Hat have enabled barriers by default in Ext3 for a long time, and now the default for mainline has been changed as well.

In other words: if you use Ext3 and you note performance regressions with this release, try disabling barriers ("barrier=0" mount option).

1.4. Support for Near-Field Communication

Near-field communication (Wiki article) allows for simplified wireless exchange of data between two devices in close proximity to each other, usually by no more than a few centimeters. Co-invented by NXP Semiconductors and Sony in 2002, NFC chips can be found in many smartphones already available in the market and more are planning to add them.

NFC is expected to become a widely used system for making payments by smartphone in the US: shoppers who have their credit card information stored in their NFC smartphones can pay for purchases by waving their smartphones near or tapping them on the reader, rather than bothering with the actual credit card. A smartphone or tablet with an NFC chip could make a credit card payment or serve as keycard or ID card. NFC devices can also read NFC tags on a museum or retail display to get more information or an audio or video presentation. NFC can also be used to share contacts, photos, songs, applications, or videos.

1.5. Slab allocator speedups

In this release, the "slub" slab allocator (the default one) implements wider lockless operations in most of the slowpaths in architectures that support CMPXCHG (compare and exchange). In particular the patch decreases the overhead in the performance critical section that frees the slabs, which speeds up slab-intensive workloads

1.7. New iSCSI implementation

The current iSCSI implementation used in the kernel, SCST, has been obsoleted with the inclusion of the Linux-iSCSI.org SCSI target. The Linux-iSCSI.org target module is a full featured in-kernel software implementation of iSCSI target mode (RFC-3720). More information can be found here.

1.8. cpupowerutils

cpupowerutils is a new project derived from cpufrequtils and extended with other features, like a powerful HW monitoring tool. Why a new project? The announcement explains it:

"CPU power consumption vs performance tuning is not about CPU frequency switching anymore for quite some time. Deep sleep states, traditional dynamic frequency scaling and hidden turbo/boost frequencies are tight close together and depend on each other. The first two exist on different architectures like PPC, Itanium and ARM the latter only on x86. On x86 the APU (CPU+GPU) will only run most efficiently if CPU and GPU has proper power management in place. Users and Developers want to have *one* tool to get an overview what their system supports and to monitor and debug CPU power management in detail". cpupowerutils is that tool.

1.9. Software RAID: Bad block management

The MD layer (aka "Multiple Devices", aka software raid) has gained bad block management support: bad blocks will be added to a list, and the system will try not to use them. This feature requires an updated mdadm version.

1.10. Personality to report 2.6.x version numbers

There are some programs which broke with the new Linux 3.0 version. Some of those were binary only (for example, all kind of management software from a certain printer manufacturer). sys.platform in Python is also know to return "linux3" under 3.0, which breaks things that were checking for sys.platform == "linux2". To solve this problem, a UNAME26 personality has been added to report 2.6.x version numbers (commit)

1.11. Wii Remote controller support

The driver for the Nintendo Wii Remote controller (wiimote) has been added