Skip to contentSkip to conversation

O(1) scheduler broken

Xenomai-core Jan Kiszka 2 participants 4 messages Mar 17, 2006 – Mar 18, 2006

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

Hi,

I just wanted to test how much the worst-cast jitters improve when running multiple timed threads over the O(1) scheduler instead of the default one. Unfortunately, it already crashes my box with the standard latency test. All debug stuff on and serial console attached still does not give any output. Looks like a really fatal scheduler crash. :(

Anyone any ideas?
Jan

#1 lore raw
Quoted 5 lines · Jan Kiszka

Hi,

I just wanted to test how much the worst-cast jitters improve when running multiple timed threads over the O(1) scheduler instead of the default one.

It really depends whether your threads actually wake up simultaneously or not.
The scalable scheduler solves the pathological case where your application has
an insane number of threads _actually_ competing for the current CPU, i.e. all being in a runnable state at the same time or within a short window of time. IOW, it implements O(1) for the ready queue. We don't use any sequential access for the suspended thread queue, and beyond that, I'm even going to kill the latter since it's actually useless.

Unfortunately, it already crashes my box with the standard

Quoted 4 lines

latency test. All debug stuff on and serial console attached still does not give any output. Looks like a really fatal scheduler crash. :(

Anyone any ideas?

It breaks with the development trunk/ because we are extending the ability of
the core pod to provide a larger priority scale, so that we can provide
VxWorks et al. with a native syscall interface. The new scale likely messes up with the priority bitmaps used in the scalable sched. Will fix.

Quoted 10 lines

Jan

------------------------------------------------------------------------

_______________________________________________
Xenomai-core mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-core

Signature · 1 line
Philippe.
#2 lore raw
Quoted 18 lines · Philippe Gerum
Quoted 5 lines · Jan Kiszka

Hi,

I just wanted to test how much the worst-cast jitters improve when running multiple timed threads over the O(1) scheduler instead of the default one.

It really depends whether your threads actually wake up simultaneously or not.
The scalable scheduler solves the pathological case where your application has
an insane number of threads _actually_ competing for the current CPU, i.e. all being in a runnable state at the same time or within a short window of time. IOW, it implements O(1) for the ready queue. We don't use any sequential access for the suspended thread queue, and beyond that, I'm even going to kill the latter since it's actually useless.

Unfortunately, it already crashes my box with the standard

Quoted 3 lines

latency test. All debug stuff on and serial console attached still does not give any output. Looks like a really fatal scheduler crash. :(

Quoted 7 lines
Quoted 1 line

Anyone any ideas?

It breaks with the development trunk/ because we are extending the ability of
the core pod to provide a larger priority scale, so that we can provide
VxWorks et al. with a native syscall interface. The new scale likely messes up with the priority bitmaps used in the scalable sched. Will fix.

This should fix the current issue.

nucleus/queue.h +1 -1
@@ -580,7 +580,7 @@
 
 /* Multi-level priority queue */
 
-#define XNSPQUEUE_PRIOS      (XNCORE_MAX_PRIO + 1)
+#define XNSPQUEUE_PRIOS      (XNCORE_MAX_PRIO + 2)
 #define XNSPQUEUE_BITMAPSIZE ((XNSPQUEUE_PRIOS + BITS_PER_LONG - 1) / BITS_PER_LONG)
 
 typedef struct xnspqueue {
Signature · 1 line
Philippe.
author
#3 lore raw
Quoted 48 lines · Philippe Gerum
Quoted 24 lines · Philippe Gerum
Quoted 5 lines · Jan Kiszka

Hi,

I just wanted to test how much the worst-cast jitters improve when running multiple timed threads over the O(1) scheduler instead of the default one.

It really depends whether your threads actually wake up simultaneously or not.
The scalable scheduler solves the pathological case where your application has
an insane number of threads _actually_ competing for the current CPU, i.e. all being in a runnable state at the same time or within a short window of time. IOW, it implements O(1) for the ready queue. We don't use any sequential access for the suspended thread queue, and beyond that, I'm even going to kill the latter since it's actually useless.

Unfortunately, it already crashes my box with the standard

Quoted 3 lines

latency test. All debug stuff on and serial console attached still does not give any output. Looks like a really fatal scheduler crash. :(

Quoted 9 lines
Quoted 1 line

Anyone any ideas?

It breaks with the development trunk/ because we are extending the ability of
the core pod to provide a larger priority scale, so that we can provide VxWorks et al. with a native syscall interface. The new scale likely messes up with the priority bitmaps used in the scalable sched. Will fix.

This should fix the current issue.

nucleus/queue.h (working copy) renamed from nucleus/queue.h (revision 741) +1 -1
@@ -580,7 +580,7 @@
 
 /* Multi-level priority queue */
 
-#define XNSPQUEUE_PRIOS      (XNCORE_MAX_PRIO + 1)
+#define XNSPQUEUE_PRIOS      (XNCORE_MAX_PRIO + 2)
 #define XNSPQUEUE_BITMAPSIZE ((XNSPQUEUE_PRIOS + BITS_PER_LONG - 1) /
 BITS_PER_LONG)
 
Quoted 2 lines

typedef struct xnspqueue {

Cute :), but it works. Thanks.

Jan