Program for Embedded & Kernel Development at fosdem 2003

2003-01-28 Thread Peter 'p2' De Schrijver
Dear all,

Fosdem 2003 will be held 8 and 9 february 2003 in Brussels. See
http://www.fosdem.org for more info.

The program for the Embedded & Kernel Development Room at fosdem 2003 :

Saturday 8/2/2003
=

14:00 - 14:45 : Keynote
opencores.org : free hardware development
Speaker : Richard Herveille

14:45 - 15:30 : Adapting Debian for Embedded Use
Speaker : Martin Michlmayr

16:00 - 16:45 : Portable programming on complex systems
Speaker : Peter De Schrijver

16:45 - 17:30 : Wonka  - a JVM for embedded systems
Speaker : Chris Gray

Sunday 9/2/2003
===

10:00 - 11:00 : breakfast + BoF's

11:00 - 11:45 : Cross-compiling in embedded systems
Speaker : Eero Tamminen
  
11:45 - 12:30 : eCos
Speaker : Nick Garnett

14:00 - 14:45 : RTAI
Speaker : Philippe Gerum

14:45 - 15:30 : GNU Bayonne and real-time issues in freely licensed 
telephony software
Speaker : David Sugar

15:30 - 16:15 : Using C++ for real-time extensions to the Linux kernel
Speaker : Peter Soetens

Cheers,

Peter.


___
Bug-hurd mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-hurd



[PATCH] soft interrupts

2003-01-28 Thread Daniel Wagner
Hello

At the moment the softint handler is called from softclock handler.
This leads to a panic which I have reported here [1].  

The main idea of this patch is that the softint handler should be
called directly from spl0 and splx_cli.  The invariant is that only
after all outstanding hardware interrupts are handled and no other
softint frame is suppended a new call to the softint handler is
allowed.  This is exactly how the OSKit handles the softints.

I've tested the patch and the kernel is quite stable and didn't see
any panic under have net last (ping -f). 

daniel

ps: I have decided to fix this before going into the serial stuff
again. 

[1]: http://mail.gnu.org/archive/html/bug-hurd/2002-11/msg00187.html


2003-01-28  Daniel Wagner  <[EMAIL PROTECTED]>

* i386/i386/spl.S (SOFTINT): New marco.
(spl0): Removed old Linux soft interrupt invokation code.  Call the 
soft interrupt handler from here.
(splx_cli): Likewise.
* oskit/pc/osenv_timer.c (softclock_oskit): Don't call oskit_softint
from here.
* oskit/osenv_softirq.c (softint_disabled):  New variable.


Index: osenv_softirq.c
===
RCS file: /cvsroot/hurd/gnumach/oskit/osenv_softirq.c,v
retrieving revision 1.2
diff -u -p -r1.2 osenv_softirq.c
--- osenv_softirq.c 27 May 2002 23:01:57 -  1.2
+++ osenv_softirq.c 28 Jan 2003 21:10:37 -
@@ -39,6 +39,10 @@ struct softint_handler {
   intflags;
 };
 
+/* Prevent oskit_softint being called while another oskit_softint frame is
+   suspended.  */
+int softint_disabled = 0;
+
 /* Array of pointers to lists of interrupt handlers.  */
 static struct softint_handler *softint_handlers[SOFT_IRQ_COUNT];
 

Index: pc/osenv_timer.c
===
RCS file: /cvsroot/hurd/gnumach/oskit/pc/osenv_timer.c,v
retrieving revision 1.2
diff -u -p -r1.2 osenv_timer.c
--- pc/osenv_timer.c27 May 2002 23:01:57 -  1.2
+++ pc/osenv_timer.c28 Jan 2003 21:06:41 -
@@ -54,8 +54,6 @@ softclock_oskit (void)
for (th = timer_head; th; th = th->next)
(*th->func)();
osenv_intr_enable();
-
-   oskit_softint();
 }
 
 /*


Index: spl.S
===
RCS file: /cvsroot/hurd/gnumach/i386/i386/spl.S,v
retrieving revision 1.2
diff -u -p -r1.2 spl.S
--- spl.S   27 May 2002 23:01:50 -  1.2
+++ spl.S   28 Jan 2003 20:43:16 -
@@ -52,33 +52,33 @@
outb%al,$(SLAVES_OCW);  \
 9:
 
+/*
+ * Call the soft interrupt handler if there is no hardware interrupt
+ * pending/worked on or another softint frame suspended.
+ */
+#define SOFTINT()  \
+   cmpl$0, EXT(nested_pic_mask);   \
+   jne 1f; \
+   cmpl$0, EXT(softint_disabled);  \
+   jne 1f; \
+   movl$1, EXT(softint_disabled);  \
+   callEXT(spl1);  \
+   callEXT(oskit_softint); \
+   cli ;   \
+   movl$0, EXT(softint_disabled);  \
+1: 
+
 ENTRY(spl0)
movlEXT(curr_ipl),%eax  /* save current ipl */
pushl   %eax
cli /* disable interrupts */
-#ifdef LINUX_DEV
-   movlEXT(bh_active),%eax
-   /* get pending mask */
-   andlEXT(bh_mask),%eax   /* any pending unmasked interrupts? */
-   jz  1f  /* no, skip */
-   callEXT(spl1)   /* block further interrupts */
-   inclEXT(intr_count) /* set interrupt flag */
-   callEXT(linux_soft_intr)/* go handle interrupt */
-   declEXT(intr_count) /* decrement interrupt flag */
-   cli /* disable interrupts */
-1:
-#endif
+
+   SOFTINT()   /* handle pending soft interrupts */
+   
cmpl$0,softclkpending   /* softclock pending? */
je  1f  /* no, skip */
movl$0,softclkpending   /* clear flag */
callEXT(spl1)   /* block further interrupts */
-#ifdef LINUX_DEV
-   inclEXT(intr_count) /* set interrupt flag */
-#endif
callEXT(softclock)  /* go handle interrupt */
-#ifdef LINUX_DEV
-   declEXT(intr_count) /* decrement interrupt flag */
-#endif
cli /* disable interrupts */
 1:
cmpl$(SPL0),EXT(curr_ipl)   /* are we at spl0? */
@@ -147,29 +147,14 @@ splx_cli:
cli /* disable interrupts */
testl   %edx,%edx   /* spl0? */
jnz 2f  /* no, skip */
-#ifdef LINUX_DEV
-   movlE

Re: [PATCH] soft interrupts

2003-01-28 Thread Joachim Nilsson
On Tue, Jan 28, 2003 at 10:24:05PM +0100, Daniel Wagner wrote:
> [snip]
> I've tested the patch and the kernel is quite stable and didn't see
> any panic under have net last (ping -f). 

Daniel, you're awsome! :-)

I've tested it too and it works great with the OSKit from Savannah.
Even when I had applied my own upgrade patches to get my NIC running
the kernel ran smoothly, this far at least.

 - <> -

I did a very small non-scientifict test pinging the box with no load
whatsoever. Below are the results, first is against GNUmach1 and
the last, GNUmach2, including your patches. (There are no other boxen
on my network to disrupt traffic)

GNUmach1:

PING 192.168.1.4 (192.168.1.4): 56 data bytes
64 bytes from 192.168.1.4: icmp_seq=0 ttl=255 time=549.8 ms
64 bytes from 192.168.1.4: icmp_seq=1 ttl=255 time=1.0 ms
64 bytes from 192.168.1.4: icmp_seq=2 ttl=255 time=0.9 ms
64 bytes from 192.168.1.4: icmp_seq=3 ttl=255 time=0.8 ms
64 bytes from 192.168.1.4: icmp_seq=4 ttl=255 time=1.1 ms
64 bytes from 192.168.1.4: icmp_seq=5 ttl=255 time=0.9 ms
64 bytes from 192.168.1.4: icmp_seq=6 ttl=255 time=0.8 ms
64 bytes from 192.168.1.4: icmp_seq=7 ttl=255 time=0.8 ms
64 bytes from 192.168.1.4: icmp_seq=8 ttl=255 time=0.9 ms


GNUmach2 (OSKit-Mach):

PING 192.168.1.4 (192.168.1.4): 56 data bytes
64 bytes from 192.168.1.4: icmp_seq=0 ttl=255 time=2.0 ms
64 bytes from 192.168.1.4: icmp_seq=1 ttl=255 time=5.1 ms
64 bytes from 192.168.1.4: icmp_seq=2 ttl=255 time=4.2 ms
64 bytes from 192.168.1.4: icmp_seq=3 ttl=255 time=5.0 ms
64 bytes from 192.168.1.4: icmp_seq=4 ttl=255 time=1.2 ms
64 bytes from 192.168.1.4: icmp_seq=5 ttl=255 time=1.2 ms
64 bytes from 192.168.1.4: icmp_seq=6 ttl=255 time=4.5 ms
64 bytes from 192.168.1.4: icmp_seq=7 ttl=255 time=4.4 ms
64 bytes from 192.168.1.4: icmp_seq=8 ttl=255 time=4.3 ms
64 bytes from 192.168.1.4: icmp_seq=9 ttl=255 time=4.2 ms

When I flood ping GNUmach2 I get 1% loss and no package loss with 
GNUmach1. Maybe we can spur some interest in tuning these numbers
a bit?


Regards
 /Joachim

--  
Joachim Nilsson  :: 
+46-(0)21-123348 :: 


___
Bug-hurd mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-hurd