[LWN Logo]
[LWN.net]

Sections:
 Main page
 Linux in the news
 Security
 Kernel
 Distributions
 Development
 Commerce
 Announcements
 Back page
All in one big page

See also: last week's Kernel page.

Kernel development


The current kernel releases remain 2.2.10 (stable) and 2.3.11 (development), there have been no kernel releases over the last week. It has been a slow week for kernel development in general, with both Linus and Alan Cox mostly out of the picture.

There is a pre-patch available for 2.3.12. It looks large, but that is mostly due to moving the parallel port drivers around in the hierarchy. It contains some USB work, a number of file system tweaks, and, interestingly, Stephen Tweedie's Raw I/O patches.

The Raw I/O code is an interesting addition. Linus has been opposed to raw I/O (I/O to disks and other block devices that bypasses the buffer cache) in the past. Stephen has found a way to implement raw I/O that has passed the test, however, and we should be seeing it in 2.3.12.

Stephen's approach is different from that seen in other Unix systems. In Solaris, for example, a disk partition might have a name like /dev/dsk/c0t0d1s0; for each such partition there automatically exists a /dev/rdsk/c0t0d1s0 which provides raw access. Under the Linux scheme, instead, no raw access exists by default. A system administrator who wishes to allow raw access to a specific device will run a helper program to set it up. Details on how it works can be found in this note from Stephen; it looks like good stuff.

Scheduling of idle CPU time. Anybody running some sort of idle-time cranker - such as a DES cracker or the SETI code - will have noticed that the task always manages to get a bit of CPU time. This happens even when the process has been maximally niced, and when there are other processes needing the CPU. Wouldn't it be nice if such processes could be completely blocked from the processor when other things are running?

It turns out that Rik van Riel has had a patch around for a while which implements a new scheduling class, SCHED_IDLE. Processes in this class get to run only if there truly is nothing else to do. This patch hasn't made it into the mainline kernel for one very good reason: it opens up the possibility of completely locking up the system.

Imagine a SCHED_IDLE task which happily cranks along for a while, and which gains a hold on some sort of crucial system resource. Something like all available virtual memory, or a lock on an important file. Then a higher-priority CPU-bound cranker comes along. The SCHED_IDLE process is now completely locked out - it can not run to release the resources it has grabbed. As it turns out, it can't even be killed, since signals do not get delivered until a process tries to do something. The result can be a locked up system; it is an open invitation to denial-of-service attacks.

The generic term for this sort of problem is "priority inversion," and it crops up in a lot of situations. Priority inversion can be addressed by raising the priority of processes when they obtain important resources. Putting in priority adjustments throughout the kernel would be a daunting task, however; more than is probably worthwhile for this particular feature.

In the end, Rik released a patch which tries to address the concerns in a realistic way. The SCHED_IDLE class gets created, but it is disabled by default. The system administrator must enable the class with a sysctl call before any process can make use of it. That and a couple of other scheduler tweaks should make SCHED_IDLE "safe enough" for many uses.

Other patches and updates released this week:

  • Kernel Debugger 0.5 has been released by SGI; this patch allows a developer to dig around inside a running system. It is probably destined to remain forever a patch, since Linus is opposed to kernel debuggers...but it will be a highly useful patch for many.

  • Along similar lines, Kerim Yaghmour released the Linux trace toolkit. This patch allows the generation of detailed logs of every action the kernel performs.

  • Richard Gooch released the perennial devfs patch.

  • Ingo Molnar put out a patch to reduce latency through a number of kernel paths. The immediate goal is to fix sound skipping problems experienced by some users, but this work should lead to a more responsive system in general.

  • Alex Buell put out version 1.1 of the Framebuffer HOWTO.

  • RAID patch 1999.07.24 has been released. This is mostly a bugfix release.

Section Editor: Jon Corbet


July 29, 1999

For other kernel news, see:

 

Next: Distributions

 
Eklektix, Inc. Linux powered! Copyright © 1999 Eklektix, Inc., all rights reserved
Linux ® is a registered trademark of Linus Torvalds