KernelNewbies:

Released unknow, 2007 ([http://kernel.org/pub/linux/kernel/v2.6/testing/ChangeLog-2.6.21-rc5 full SCM git log])

TableOfContents()

Short overview (for news sites, etc)

2.6.21 improves the virtualization features merged in 2.6.20 with VMI (http://lwn.net/Articles/175706), a paravirtualization interface that will be used by Vmware (and maybe -probably not- Xen) software. KVM does get initial paravirtualization along with live migration and host suspend/resume support (http://lwn.net/Articles/223839). 2.6.21 also gets a tickless idle loop mechanism called "Dynticks" (http://lwn.net/Articles/223185), a feature built in top of "clockevents" which unifies the timer handling and brings true high-resolution timers. Other features are: bigger kernel command-line, optional ZONE_DMA; support for the PA SEMI PWRficient CPU, for a Cell-based "celleb" architecture from Toshiba, better PS3 support: support for NFS IPv6, IPv4 <-> IPv6 IPSEC tunneling support, UFS2 write support, kprobes for PPC32, kexec and oprofile for ARM, public key encription for ecryptfs, Fcrypt and Camilla cipher algorithms, NAT port randomization, audit lockdown mode, many new drivers and many other small improvements.

Important things (AKA: ''the cool stuff'')

VMI (Virtual Machine Interface)

VMI is a virtualization feature built in top of the paravirt_ops paravirtualization implementation introduced in [http://kernelnewbies.org/Linux_2_6_20 2.6.20].

Paravirtualizated kernels need to be modified to run under a hypervisor. The goal of VMI is to become the common paravirtualization interface for hypervisors like Xen and Vmware. Vmware will certainly use VMI; Xen was going to use VMI but they may develop their own VMI-like interface. Any hypervisor can use VMI by providing a (GPLed) ROM; the ROM describes how the low-level VMI kernel must use the hypervisor. A VMI-enabled kernel can also boot on bare hardware and no hypervisor with no performance impact [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9226d125d94c7e4964dd41cc5e9ca2ff84091d01 (commit 1] [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8b15114434998a78aa50f8559d69c7a400cff267 2], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ae5da273fe3352febd38658d8d34484cbcfb3423 3], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7b3552024380f306a6c50d5105d18d9d4258fa4e 4], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c119ecce894120790903ef535dac3e105f3d6cde 5], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7ce0bcfd1667736f1293cff845139bbee53186de 6], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bbab4f3bb7f528d2b8ccb5de9ae5f6ff3fb29684 7], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=90736e20e3805dd1ffff60e4750495944956cd44 8)]

More details about VMI can be found in this LWN article: "[http://lwn.net/Articles/175706/ The VMI virtualization interface]"

KVM updates

KVM does evolve at a very fast pace, due to its clean design. This release (KVM-15) brings many new features:

Recommended LWN article: [http://lwn.net/Articles/223839/ "KVM-15"]

[http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=102d8325a1d2f266d3d0a03fdde948544e72c12d (commit 1], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=02e235bc8eebf8a6fef10d46479b3c18f3e9c4f2 2], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c21415e84334af679630f6450ceb8929a5234fad 3], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=774c47f1d78e373a6bd2964f4e278d1ce26c21cb 4], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=59ae6c6b87711ceb2d1ea5f9e08bb13aee947a29 5)]

Dynticks and Clockevents

Recommended LWN article: [http://lwn.net/Articles/223185/ "Clockevents and dyntick"]

(This feature touches a lot of low-level x86 code, so regressions are possible. If you have problems with 2.6.1, please [http://bugzilla.kernel.org report it])

Clockevents is a building block of dynticks. A example of a clock devices is the device which makes timer interrupts. The handling of those devices was made in the architecture-specific code, so there wasn't an unified way of using those devices. The clockevents patch unifies the clockdevice handling so the kernel can use the timer capabilities of those devices in a unified manner. This also allows to implement true high-resolution timers.

Dynticks (aka: dynamic ticks) it's a configurable feature for x86 32bits (x86-64 and ARM support is already done but not ready for this release; PPC and MIPS support are in the works) that changes the heart of the mechanism that allow a system to implement multitasking. To know what dyntick does, first you should know some basics: Traditionally, multitasking is implemented thanks to a timer interrupt that is configured to fire N times in a second. Firing this interrupt causes a call to the operative system's process scheduler routines. Then, the scheduler decides what process should run next, the process that was running before the timer interrupt was fired, or another process. This is how true multitasking is implemented in all the general-purpose operative systems, it's also what stops processes from being able to monopolize the CPU time: The timer interrupt will be fired regardless of what the process is doing and the operative system will be able to stop it.

N (the number of times the timer interrupt is fired in each second, aka 'HZ') is a hardcoded compile-time architecture-dependent constant. For Linux 2.4 (and Windows), HZ=100 (the timer interrupt fires 100 times per second). 2.6 increased HZ to 1000, for several reasons: 100 was the HZ value that x86 had been using since forever, and it didn't really had a lot of sense in modern CPUs that runs much faster: Higher HZ means smaller process time slices, which improves the minimum latency and interactivity. The downside is higher timer overhead (negligible in modern hardware, although some server-oriented distros package kernels with HZ=100 because of minor performance gains) and high pitch noises in some systems due to low-quality, cheap capacitators

Anyway, the issue is that the timer is fired HZ times in every second - even if the system is doing nothing. Dynticks is a feature that stops the system from waking up HZ times per second. When the system is entering the idle loop it disables the periodic timer interrupt, and programs the timer to fire the next time a timer event is needed. This means your system will be 'disabled' while there's nothing to do (unless a interrupt happens - ej: a incoming packet through your network). For now, dynticks does just that. However, this infrastructure will allow to create a innovative power-saving feature: When dynticks is in "tickless" mode and the system is waiting for the timer interrupt, the power-saving feature of modern CPUs will be used. This can save a few W when the laptop is idle. Dynticks also adds some nice configurable debugging features: /proc/timer_list prints all the pending timers, allowing developers to check if their program is doing something wrong when it should be doing nothing, /proc/timer_stat, in the other hand, collects some timer statistics, allowing to detect the source of commonly-programmed timers.

[http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f4304ab21513b834c8fe3403927c60c2b81a72d7 (commit 1], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=92c7e00254b2d0efc1e36ac3e45474ce1871b6b2 2], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5d8b34fdcb384161552d01ee8f34af5ff11f9684 3], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1cfd68496e53f7be09a3c1358d1d389004217541 4], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fd064b9b7770d5c7705bf9542950c7bd81c30f98 5], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c9cb2e3d7c9178ab75d0942f96abb3abe0369906 6], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3c8aa39d7c445ae2612b6b626f76f077e7a7ab0d 7], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=303e967ff90a9d19ad3f8c9028ccbfa7f408fbb3 8], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=dd3629b5e5f03dde6d8a17bb798bcb0ba6c3f579 9], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5cfb6de7cd7c8f04655c9d23533ca506647beace 10], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3434933b17fa64adddf83059603c61296f6e1ee2 11], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=169a0abbe32813af4904cc1605c0f7ea0534f77b 12], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d66bea57e779cd592657cca6e61345ae899b78d9 13], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e05d723f98595b2f4d368f63636a997d98703304 14], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d316c57ff6bfad9557462b9100f25c6260d2b774 15], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=906568c9c668ff994f4078932ec6ae1e3950d1af 16], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f8381cba04ba8173fd5a2b8e5cd8b3290ee13a98 17], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=79bf2bb335b85db25d27421c798595a2fa2a0e82 18], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e9e2cdb412412326c4827fc78ba27f410d837e6e 19], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d36b49b91065dbfa305c5a66010b3497c741eee0 20], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=741673473a5b26497d5390f38d478362e27e22ad 21], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f8b5035b9abd01b52ec6416f0c6bade7e603742c 22], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d40891e75fc1f646dce57d5d3bd1349a6aaf7a0e 23], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=54cdfdb47f73b5af3d1ebb0f1e383efbe70fde9e 24], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8bfd9a7a229b5f3d3eda5d7d45c2eebec5b4ba16 25], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=289f480af87e45f7a6de6ba9b4c061c2e259fe98 26], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=82f67cd9fca8c8762c15ba7ed0d5747588c1e221 27], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=88ad0bf6890505cbd9ca1dbb79944a27b5c8697d 28)]

ASoC

The [http://www.rpsys.net/openzaurus/patches/alsa/info.html ASoC (ALSA System on Chip) layer] has been added to the ALSA sound system. Its aim is to provide improved support for sound processors on embedded systems. The ASoC core is designed to allow reuse of codec drivers on other platforms, reuse of platform specific audio DMA and DAI drivers on different machines, easy I2S/PCM digital audio interface configuration between codec and SoC, and allow machines to add controls and operations to the audio subsystem. e.g. volume control for speaker amp.

To achieve all this, ASoC splits an embedded audio system into 3 components: 1. Codec driver: The codec driver is platform independent and contains audio controls, audio interface capabilities, codec dapm and codec IO functions 2. Platform driver: The platform driver contains the audio dma engine and audio interface drivers (e.g. I2S, AC97, PCM) for that platform. 3. Machine driver: The machine driver handles any machine specific controls and audio events. i.e. turning on an amp at start of playback.

It includes a dynamic power management subsystem, designed to allow portable and handheld Linux devices to use the minimum amount of power within the audio subsystem at all times. It is independent of other kernel PM and as such, can easily co-exist with the other PM systems. DAPM is also completely transparent to all user space applications as all power switching is done within the ASoC core. No code changes or recompiling are required for user space applications. DAPM makes power switching decisions based upon any audio stream (capture/playback) activity and audio mixer settings within the device.

A number of platform and codec drivers for ASoC have been merged as well.

[http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=596ce32b74dccf53ef59cc9ba2e95a2a34ba921c (commit 1], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5a8ec343c5ba1e78ba23bebd9ad4b23f39c50828 2], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6297027629a9349301e08442b67deb9783a5e984 3], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6e24dd9310b66d6f500a81ee320a8babec529573 4], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=734c2d4bb7cfccaab79923331efc7422e4e76a8a 5], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=73f40dc1e147b41eb74bc92ff62bb65cb3260eff 6], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=75b41027662e29822746342865fa8abd941d2604 7], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7f137ab673124ee0a210ab5b74c1f7234d6145fa 8], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7fb290d03af69bfca5876573ac0eada40bd4e292 9], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=808db4a4512bedd45b62de255f7eedb5d5b788b9 10], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8dafc0fb49b903c4e7262b2622bef8342345c700 11], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=97952f601e939278df1194bac56b9755338ee7c1 12], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a1eb4b3caf3abd0d1a8474f07d29959e1879bb29 13], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a3288176de3fdd439d9bca0a0b9ca749c12ac5ac 14], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a71a468a50f1385855e28864e26251b02df829bb 15], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a8f5d0a5d02cda0183c6e68d6a66d4c6641149a9 16], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=abadfc928a27e1cf27c834e8e29e6b1f64ca2d55 17], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b36d61d45654104c04ff71055ef09c696fea5f89 18], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b41bf38a4323a32ec4890c74818c4a3d2661fe6c 19], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c8044274c7f1e269975b2bd55d057ceb7708e929 20], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cb4c048b9306555ccbdb97eaf7922624664b0eb1 21], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cbe83b1795feea33803dc89fce18b2b98abbcc9b 22], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d3d35adc79aa2e48e8177a9506e9bcb5eebba406 23], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d928b25a89c3154fe6d0e62a83f51c5b621aa099 24], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=db2a416556af0313db028147e4a22fef6f214f2f 25], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=dbc6b6ad767c86907db373e85139b0e975ba7599 26], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=eaff2ae702f937020bfde96eea552caae3815784 27], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=eb1a6af39b70375d93ed25e7c916f64463e00614 28], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f11a96d5cd94202479e603f9dfaff6e92f342135 29], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ff9abf5b0a655b59d59ea61aec5be6285bf3ac30 30], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0cbbec0984f10f216ed8332e0d39ac93cbe33a0b 31], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=10c5cf30446fe91b7173436b75c4f00dfb4cd9f8 32], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=171eb8f81d7b0706c1085d272e4955251ed9f05f 33], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1b49cb987030c09ca763c1dabd5c5e33f669e530 34], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2b97eabc09f42d0f63e8053636e34e1afa0d604e 35], [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3e7cc3d3d1c435f83533b8bf2cf1833855be2901 36], [http://

KernelNewbies: Linux_2_6_21 (last edited 2007-03-30 17:16:41 by diegocalleja)