2002-01-24 09:34:34

by Robert Love

[permalink] [raw]
Subject: [PATCH] preemptive kernel

The patch makes the Linux kernel preemptible: higher priority processes
can preempt other lower priority processes, even if they are running in
kernel-mode.

An updated preemptive kernel for 2.5.3-pre4 is available here:

ftp://ftp.kernel.org/pub/linux/kernel/people/rml/preempt-kernel/v2.5/

And for 2.4.8-pre6 (and 2.4.18-pre6 + Ingo's O(1) Scheduler, J5):

ftp://ftp.kernel.org/pub/linux/kernel/people/rml/preempt-kernel/v2.4/

Most notably, the SMP instabilities under the new scheduler have been
solved. This version is rock-solid on my testing in both 2.4 and 2.5
under UP and SMP.

Ingo Molnar offered some optimizations, some of which are in this
release and others which I will work on for future releases.

Enjoy,

Robert love

Changes since 20020113 release:

- rename preempt_is_disabled to preempt_get_count (me)

- remove preempt_prefetch, it does more harm than good (Ingo Molnar)

- optimize preempt_enable (George Anzinger, Ingo Molnar)

- better locking in sched.c (me)

- fix race on fork (Ingo Molnar)

- fix mismatched locking in new O(1) migration code (me)

- use BUG_ON instead of BUG where applicable (me)
o for 2.4, add BUG_ON macro

- update Documentation/preempt_locking.txt (me)

- misc clean up (me)


2002-01-24 15:31:42

by Dieter Nützel

[permalink] [raw]
Subject: Re: [PATCH] preemptive kernel

Hello Robert,

can you please redo for O(1)-J6 (2.4.18-pre7) or is nothing changed?

Thanks,
Dieter

2002-01-24 15:56:42

by Tom Rini

[permalink] [raw]
Subject: Re: [PATCH] preemptive kernel

On Thu, Jan 24, 2002 at 04:31:07PM +0100, Dieter N?tzel wrote:

> Hello Robert,
>
> can you please redo for O(1)-J6 (2.4.18-pre7) or is nothing changed?

Or -J6 there was a small reject, it looks like -J6 sets p->cpu =
smp_processor_id(); in kernel/sched.c, which the preempt patch wants to
do as well.

--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

2002-01-24 16:00:14

by Ingo Molnar

[permalink] [raw]
Subject: Re: [PATCH] preemptive kernel


On Thu, 24 Jan 2002, Tom Rini wrote:

> > can you please redo for O(1)-J6 (2.4.18-pre7) or is nothing changed?
>
> Or -J6 there was a small reject, it looks like -J6 sets p->cpu =
> smp_processor_id(); in kernel/sched.c, which the preempt patch wants to
> do as well.

it's the same fix - you can safely disregard the reject.

Ingo

2002-01-24 16:06:53

by Tom Rini

[permalink] [raw]
Subject: Re: [PATCH] preemptive kernel

On Thu, Jan 24, 2002 at 06:57:27PM +0100, Ingo Molnar wrote:
>
> On Thu, 24 Jan 2002, Tom Rini wrote:
>
> > > can you please redo for O(1)-J6 (2.4.18-pre7) or is nothing changed?
> >
> > Or -J6 there was a small reject, it looks like -J6 sets p->cpu =
> > smp_processor_id(); in kernel/sched.c, which the preempt patch wants to
> > do as well.
>
> it's the same fix - you can safely disregard the reject.

If you apply -J6 after. preempt adds preempt_enable() in the same
section.

--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

2002-01-24 16:08:13

by Ingo Molnar

[permalink] [raw]
Subject: Re: [PATCH] preemptive kernel


On Thu, 24 Jan 2002, Tom Rini wrote:

> > > Or -J6 there was a small reject, it looks like -J6 sets p->cpu =
> > > smp_processor_id(); in kernel/sched.c, which the preempt patch wants to
> > > do as well.
> >
> > it's the same fix - you can safely disregard the reject.
>
> If you apply -J6 after. preempt adds preempt_enable() in the same
> section.

right.

Ingo

2002-01-24 19:08:07

by Robert Love

[permalink] [raw]
Subject: Re: [PATCH] preemptive kernel

On Thu, 2002-01-24 at 10:31, Dieter N?tzel wrote:
> Hello Robert,
>
> can you please redo for O(1)-J6 (2.4.18-pre7) or is nothing changed?

As Ingo and Tom pointed out, its a trivial reject, but I've gone ahead
and updated the 2.4 patches to 2.4.18-pre7 and 2.4.18-pre7-J6:

ftp.kernel.org/pub/linux/kernel/people/rml/preempt-kernel/v2.4/

My SMP Athlon survived a stress run over night on 2.5.3-pre4-preempt.
Excellent.

Robert Love