-What's new in the Linux kernel - DebConf 2013
+What's new in the Linux kernel - DebConf 2014
@@ -39,7 +39,7 @@
@@ -50,6 +50,7 @@
What's new in the Linux kernel
+
and what's missing in Debian
Ben Hutchings
@@ -58,13 +59,13 @@
Professional software engineer by day, Debian developer by night
+ (or sometimes the other way round)
Regular Linux contributor in both roles since 2008
- Maintaining a net driver in my day job, plus core networking
- and PCI code as necessary
+ Working on various drivers and kernel code in my day job
Debian kernel team member, now doing most of the unstable
@@ -83,10 +84,15 @@
Linux is released about 5 times a year (plus stable updates
every week or two)
+
+
+ ...though some features aren't ready to use when they firat
+ appear in a release
+
+
- For 'wheezy' we chose to freeze with Linux 3.2, which was
- getting pretty old by the time of release
+ Since my talk last year, Linus has made 6 releases (3.11-3.16)
Good news: we have lots of new kernel features in testing/unstable
@@ -98,169 +104,151 @@
-
Team device driver [3.3]
-
-
- Alternative to the bonding driver - simpler, modular, high-level
- control deferred to userland
-
-
- Basic configuration can be done with ip, but it really
- needs new tools - teamd, teamnl, etc.
-
- Abstract storage for memory pages, expected to be slower than
- regular memory but faster than disk
-
-
- Can provide a second layer of page cache (cleancache and frontswap)
+ Team device driver: userland package (libteam) was uploaded in
+ October
- Pages stored by hypervisor (Xen), compressed local memory
- (zcache) or cluster of machines (RAMster)
+ Transcendent memory: frontswap, zswap and Xen tmem will be
+ enabled in next kernel upload
- Not yet enabled in Debian kernels, and needs some thought about
- configuration
+ New KMS drivers: should all work with current Xorg drivers
- Make it work: see
- https://lwn.net/Articles/454795/
- and send proposal to debian-kernel
+ Module signing: still not enabled, but probably will be if we
+ do Secure Boot
-
New KMS drivers [3.3-3.10]
+
Recap of last year's features (2)
- DRM/KMS drivers added for old, new and virtual hardware -
- AST, DisplayLink, Hyper-V, Matrox G200, QEMU Cirrus
-
-
- Should be more robust than purely user-mode drivers, and
- compatible with Secure Boot
-
-
- Current X drivers don't work with these, so the kernel drivers
- are disabled for now
-
-
- Make it work: join the X Strike Force and package the new X
- drivers
+ More support for discard: still not enabled at install time
+ (#690977)
-
-
-
-
-
Module signing [3.7]
-
- Kernel modules can be signed at build time, and the kernel
- configured to refuse loading unsigned modules
+ More support for containers: XFS was fixed, and user namespaces
+ have been enabled
- Necessary but not sufficient to implement Secure Boot -
- we would also need signed kernel images and some other
- restrictions when booted in this mode
+ bcache: userland package (bcache-tools) still not quite ready
+ (#708132)
- Make Secure Boot work: come to the meeting on Tuesday
+ ARMv7 multiplatform: d-i works on some platforms but
+ I'm still not sure which. Some progress on GPU drivers, but not
+ in Debian yet.
-
More support for discard
-
+
Unnamed temporary files [3.11]
+
- Flash devices (and thin-provisioned SANs) can be more efficient
- if the filesystem 'discards' unused disk space
+ Open directory with option O_TMPFILE to create an
+ unnamed temporary file on that filesystem
- Requires support in hardware, driver, filesystem and any layered
- device drivers - e.g. LVM, RAID (added in 3.7)
+ As with tmpfile(), the file disppears on
+ last close()
- Must be explicitly enabled, but d-i doesn't do this by default
+ File can be linked into the filesystem using
+ linkat(..., AT_EMPTY_PATH), allowing for 'atomic'
+ creation of file with complete contents and metadata
- Make it work: fix http://bugs.debian.org/690977
+ Not supported on all filesystem types, so you will usually need
+ a fallback
-
User namespaces [3.7]
-
+
Lustre filesystem [3.12]
+
- One of the last missing pieces for OpenVZ-like containers
+ A distributed filesystem, popular for cluster computing
+ applications
- Each user namespace has its own root user with
- privileges over the users and processes in that namespace - but
- not the whole system
+ Developed out-of-tree since 1999, but now added to Linux staging
+ directory
- Currently somewhat experimental, and requires filesystem
- changes which haven't been done for XFS
+ Was included in squeeze but dropped from wheezy as it didn't
+ support Linux 3.2
- Make it work: send patches to upstream XFS developers (this
- one's hard)
+ Userland is now missing from Debian
-
bcache [3.10]
-
-
- Turns a fast block device into a cache for a larger, slower
- device (see also: dm-cache, EnhanceIO)
-
A conventional network request/response process looks like:
+
+
+
+ Task calls send(); network stack constructs a
+ packet; driver adds it to hardware Tx queue
+
+
+ Task calls poll() or recv(), which blocks;
+ kernel puts it to sleep and possibly idles the CPU
+
+
+ Network adapter receives response and generates IRQ, waking
+ up CPU
+
+
+ Driver's IRQ handler schedules polling of the hardware Rx
+ queue (NAPI)
+
+
+ Kernel runs the driver's NAPI poll function, which passes
+ the response packet into the network stack
+
+
+ Network stack decodes packet headers and adds packet to
+ the task's socket
+
+
+ Network stack wakes up sleeping task; scheduler switches
+ to it and the socket call returns
+
+
+
-
ARMv7 multiplatform
+
Network busy-polling [3.11] (2)
- Until recently, each ARM kernel image could support only a small
- set of different chips
-
-
- Debian 'armmp' kernel now supports ARMv7 SoCs from Calxeda,
- Freescale and Marvell, and others should be supported soon
+ If driver supports busy-polling, it tags each packet with
+ the receiving NAPI context, and kernel tags sockets
- Debian could run on a much larger range of ARM hardware - but we
- need installer and boot loader support to make this easy
+ When busy-polling is enabled, poll()
+ and recv() call the driver's busy poll function to
+ check for packets synchronously (up to some time limit)
- Make it work: join the ARM porters and d-i team
+ If the response usually arrives quickly, this reduces overall
+ request/response latency as there are no context switches and
+ power transitions
- Make the GPUs work: join a reverse-engineering project
+ Time limit set by sysctl (net.busy_poll,
+ net.busy_read) or socket option (SOL_SOCKET,
+ SO_BUSY_POLL); requires tuning