Linux 3.0 Kernel Handles Xen And KVM Virtualization

July 22, 2011
The new Linux 3.0 kernel will probably take awhile to get to embedded developers but it handles Xen And KVM virtualization along with a number of new features.

Xen architecture

The Linux 3.0 kernel marks the transition to a new set of kernels. It actually incorporates few changes from the prior version but does add some significant features like Xen dom0 support (Fig. 1) as well as BTRFS file system support. All of the features have been available on custom versions of the kernel but these changes should make it easier for developers and users.

Citrix Systems supports Xen and sells XenServer that competes with . Likewise, Xen is an alternative to KVM (Kernel-based virtual machine) that Red Hat uses in its Red Hat Enterprise Linux 6 (RHEL). RHEL also support Xen but Red Hat's preference is now KVM. KVM is also the preference for many embedded developers.

Xen supports paravirtualization as well as hardware-assisted virtualization. KVM supports the latter. As noted, Xen has always been available for the Linux kernel but often a user or vendor had to build their own version from the latest source code.

The amount of code in the kernel for KVM and Xen support is small and they can share some functionality. The two differ in the way the hypervisor is implemented. In Xen's case, Xen is the hypervisor and Linux runs in the dom0 virtual machine. The management tools can run in this partition to control the other virtual machines that are collectively referred to as domU.

KVM uses Linux as the hypervisor running additional virtual machines in their own partitions like Xen domU partitions. The main difference being Xen's support for paravirtualized partitions. From a hardware virtualization standpoint, the operating systems running in the domU partitions of KVM or Xen will work in the same fashion. KVM tends to be a very efficient virtual machine hypervisor implementation and is often preferred for embedded applications needing virtualization support.

BTRFS File System

Linux has supported a range of file systems with ext3 being the default for most distributions for quite awhile. BTRFS (B-Tree File System) is a copy-on-write file system supporting features that embedded developers and enterprise users appreciate such as cloning, writeable snapshots, online defragmentation, subvolumes, compression, and many more. BTRFS will be the default file system for Fedora 16, a Linux distribution. Fedora 15 is shipping now. Red Hat's RHEL 6 has BTRFS support but it is not the default file system. That is ext4 right now.

Cloning and snapshots are very useful for KVM and Xen support. A read-only master image can be used as a snapshot to run in a virtual machine partition almost immediately. This is handy in cloud environments where new instances of a service are often needed as demand rises.

BTRFS is an extent-based file storage system that supports files up to 16 Exabytes (2^64 bytes). It also handles small files efficiently by packing. It dynimically allocates inodes (index nodes) that are used by Linux. BTRFS supports compresion, RAID with integrated multiple device support, incremental backup and subvolumes. Subvolumes are separate internal file system roots.

BTRFS has limited, built-in transactional support. It lacks ACID (atomicity, consistency, isolation, durability) semantics. BTRFS can be used by database servers but the database would provide ACID transactional support.

Oracle is helping to develop BTRFS as well as Oracle's ZFS. The two provide many common services such as copy-on-write support. ZFS is available for many operating systems including Oracle Solaris and Linux but there are licensing issues with Linux. The Common Development and Distribution License (CDDL) license is not compatible with the Linux kernel's General Public License (GPL). Normally ZFS is run in user mode instead of using kernel support. ZFS remains important to Oracle and Solaris users but BTRFS is likely to be the choice for Linux developers.

The Linux 3.0 kernel will likely find its way into desktop and server distributions like Ubuntu before it arrives on embedded developers' desks. That will be followed by support on smartphones and Android in particular. Android, like most embedded Linux distributions tends to lag so they can provide a stable base rather than a platform for cutting edge improvements.

Other Kernel Changes

The latest kernel improves interoperability with UEFI (Unified Extensible Firmware Interface). UEFI replaces the motherboard's BIOS with a more modular firmware system. It is being provided on more motherboards, usually in conjunction with a conventional BIOS. UEFI can handle larger disks and different peripherals whereas the typical BIOS is more limited.

Sponsored Recommendations

TTI Transportation Resource Center

April 8, 2024
From sensors to vehicle electrification, from design to production, on-board and off-board a TTI Transportation Specialist will help you keep moving into the future. TTI has been...

Cornell Dubilier: Push EV Charging to Higher Productivity and Lower Recharge Times

April 8, 2024
Optimized for high efficiency power inverter/converter level 3 EV charging systems, CDE capacitors offer high capacitance values, low inductance (< 5 nH), high ripple current ...

TTI Hybrid & Electric Vehicles Line Card

April 8, 2024
Components for Infrastructure, Connectivity and On-board Systems TTI stocks the premier electrical components that hybrid and electric vehicle manufacturers and suppliers need...

Bourns: Automotive-Grade Components for the Rough Road Ahead

April 8, 2024
The electronics needed for transportation today is getting increasingly more demanding and sophisticated, requiring not only high quality components but those that interface well...

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!