2000-11-23 00:34:35

by Nigel Gamble

[permalink] [raw]
Subject: [PATCH] Latest preemptible kernel (low latency) patch available

MontaVista Software's latest preemptible kernel patch,
preempt-2.4.0-test11-1.patch.bz2, is now available in
Here is an extract from the README file:

The patches in this directory, when applied to the corresponding
kernel source, will define a new configure option, 'Preemptable Kernel',
under the 'Processor type and features' section. When enabled, and the
kernel is rebuilt it will be fully preemptable, subject to SMP lock
areas (i.e. it uses SMP locking on a UP to control preemptability).

The patch can only be enabled for ix86 uniprocessor platforms.
(Stay tuned for other platforms and SMP support.)

Notes for preempt-2.4.0-test11-1.patch

- Updated to kernel 2.4.0-test11

Notes for preempt-2.4.0-test10-1.patch

The main changes between this and previous patches are:

- Updated to kernel 2.4.0-test10
- Long held spinlocks changed into mutex locks, currently implemented
using semaphores. (We are working on a fast, priority inheriting,
binary semaphore implementation of these locks.)

The patch gives good results on Benno's Audio-Latency test
http://www.gardena.net/benno/linux/audio/, with maximum
latencies less than a couple of milliseconds recorded
using a 750MHz PIII machine. However, there are still
some >10ms non-preemptible paths that are not exercised
by this test.

The worst non-preemtible paths are now dominated by the big
kernel lock, which we hope can be completely eliminated in 2.5
by finer grained locks.

(I will be at the Linux Real-Time Workshop in Orlando next week, and
may not be able to access my work email address ([email protected]),
which is why I'm posting this from my personal address.)

Nigel Gamble [email protected]
Mountain View, CA, USA. http://www.nrg.org/

2000-11-25 00:23:22

by Roger Larsson

[permalink] [raw]
Subject: [PATCH] Re: [PATCH] Latest preemptible kernel (low latency) patch available


I got compilation errors due to use of START / STOP
definitions (zlib.c, ppp?)

This little additional patch should fix it. They were not
used in any other place of the patch...

I am still compiling...


--- spinlock.h.preemt Sat Nov 25 00:31:38 2000
+++ spinlock.h Sat Nov 25 00:30:50 2000
@@ -47,21 +47,21 @@
* Here are the basic preemption lock macros.
-#define START 0
-#define STOP 1
-#define BKL ((((pree)current)->lock_depth) != -1)
+#define PREEMPT_START 0
+#define PREEMPT_STOP 1
+#define PREEMPT_BKL ((((pree)current)->lock_depth) != -1)

#define debug_lock(t) do { \
- if ((in_ctx_sw_off() - (BKL?1:0)) < t) \
+ if ((in_ctx_sw_off() - (PREEMPT_BKL?1:0))
< t) \
} while (0)
#define debug_lock(t) do { } while (0)

-#define preempt_lock_start(c) debug_lock(START)
-#define preempt_lock_stop() debug_lock(STOP)
+#define preempt_lock_start(c) debug_lock(PREEMPT_START)
+#define preempt_lock_stop() debug_lock(PREEMPT_STOP)

#include <asm/current.h>

Home page: