From: Robert L. <rm...@te...> - 2001-12-02 02:50:24
Attachments:
preempt-kernel-sh-2.4.16-1.patch
|
The attached is the fully preemptible linux kernel patch, for the SH arch. This work is thanks to Jeremy Siegel of MontaVista. You will need an SH-patched kernel tree, available from http://sf.net/projects/linuxsh -- the CVS module "linux" has a drop-in replacement for 2.4.16. You will need the base preempt-kernel patch, available from ftp://ftp.kernel.org/pub/linux/kernel/people/rml/preempt-kernel Feedback is desired. Robert Love |
From: Robert L. <rm...@te...> - 2001-12-02 03:28:31
|
ftp://ftp.kernel.org/pub/linux/kernel/people/rml/sh/sh-update-rml-2.4.16-1.patch I went ahead and diffed 2.4.16 against the SH tree. Thus you can patch 2.4.16 directly without checking into CVS. Hopefully this might encourage some testers. ftp://ftp.kernel.org/pub/linux/kernel/people/rml/preempt-kernel/v2.4/preempt-kernel-rml-2.4.16-1.patch ftp://ftp.kernel.org/pub/linux/kernel/people/rml/sh/preempt-kernel-sh-2.4.16-1.patch The above is links to the preempt-kernel patch and the arch-sh specific work. Users need to patch 2.4.16 with the three patches above and enable CONFIG_PREEMPT to create the preemptible kernel for SH. Robert Love |
From: Jeremy S. <js...@mv...> - 2001-12-03 21:16:03
|
Just FYI... the preemptible kernel depends on non-preemptible critical regions denoted by spinlock calls (see Robert Love's excellent summary in Documentation/preempt-locking.txt). Many common drivers are assumed to have correct locking for SMP operation, but non-SMP drivers may not. I've only run the PreK SH kernel on the Solution Engine w/Ethernet and serial, but I did not yet check to see if additional locks might be required in drivers/char/sh-sci.c or drivers/net/stnic.c, which are specific to SH platforms and thus not SMP-safe otherwise. --Jeremy Robert Love wrote: > The attached is the fully preemptible linux kernel patch, for the SH > arch. This work is thanks to Jeremy Siegel of MontaVista. > > You will need an SH-patched kernel tree, available from > http://sf.net/projects/linuxsh -- the CVS module "linux" has a drop-in > replacement for 2.4.16. > > You will need the base preempt-kernel patch, available from > ftp://ftp.kernel.org/pub/linux/kernel/people/rml/preempt-kernel > > Feedback is desired. > > Robert Love |
From: Robert L. <rm...@te...> - 2001-12-03 22:18:08
|
On Mon, 2001-12-03 at 16:16, Jeremy Siegel wrote: > Just FYI... the preemptible kernel depends on non-preemptible critical regions > denoted by spinlock calls (see Robert Love's excellent summary in > Documentation/preempt-locking.txt). Many common drivers are assumed to have > correct locking for SMP operation, but non-SMP drivers may not. I've only run > the PreK SH kernel on the Solution Engine w/Ethernet and serial, but I did not > yet check to see if additional locks might be required in drivers/char/sh-sci.c > or drivers/net/stnic.c, which are specific to SH platforms and thus not SMP-safe > otherwise. Ahh, good point. Similar situation occured on ARM when it went preemptive. Thankfully, Russel King and company try to properly lock things even if they are no ops. Coding under a preemptive kernel means more than what Documentation/preempt-locking.txt implies ... you have to protect data regions as if you are operating under SMP. It is good practice, anyhow. This means you can include linux/spinlock.h and use the locking constructs as needed. Under a normal UP kernel, they will compile away. Under a preemptive kernel, they will provide the needed reentrancy protection. If there ever is a an SMP SH kernel (or something like it) the kernel will be ready for the future. Robert Love |
From: Robert L. <rm...@te...> - 2001-12-05 22:22:27
Attachments:
gcc-ice-rml-3.0.2-1.patch
|
Users of gcc-3.x will need the attached patch _for gcc_ to compile an SH kernel patched with preempt-kernel. This is _not_ our fault, it is a gcc bug and is now merged into CVS and should be part of gcc-3.1. gcc-2.9x compiles without problem. It is only 3.x versions that suffer the bug. Robert Love P.S. Also of note: yes this works on Sega Dreamcast. You can have a fully preemptible Dreamcast. Impress your friends. Or something. |
From: Kimball M. <km...@ti...> - 2001-12-06 18:32:03
|
Robert Love wrote: > > Users of gcc-3.x will need the attached patch _for gcc_ to compile an SH > kernel patched with preempt-kernel. This is _not_ our fault, it is a > gcc bug and is now merged into CVS and should be part of gcc-3.1. > > gcc-2.9x compiles without problem. It is only 3.x versions that suffer > the bug. > > Robert Love > > P.S. Also of note: yes this works on Sega Dreamcast. You can have a > fully preemptible Dreamcast. Impress your friends. Or something. > > ------------------------------------------------------------------------ > Name: gcc-ice-rml-3.0.2-1.patch > gcc-ice-rml-3.0.2-1.patch Type: Plain Text (text/plain) > Encoding: quoted-printable Hi all! My name is Kimball Murray and I have just recently completed a fully preemptible kernel port for TimeSys Corporation that runs on the SH3/SH4 boards. This kernel also runs all IRQ handlers as threads (except for the timer interrupt). This allows interrupt handlers to be scheduled using priorities (great for real- time systems). The degree of preemption is finer grained than that of the existing preemption patch which should lead to lower latency. Additionally, the tool chain and reasonably large root filesystem are nicely packaged with a nice install process. I would be delighted if someone were to download the GPL'ed kernel for SH3 or SH4 from www.timesys.com and give it a whirl. We'd love some feedback on this. I'd also like to thank the many people whose names pop up so frequently on this list who've contributed in countless ways to Linux on the SH processor. And special thanks to the tool chain contributors! Cheers! -Kimball |