Maximum number of kernel tasks?
Hello,
This is my first project using Xenomai. I have a Diamond Systems Athena II board with an 800 MHz VIA Mark (Corefusion) chip. I built Xenomai 2.4.5 with Linux kernel 2.6.26.5 and I-pipe 2.0-09.
For some reason I can create 7 kernel tasks just fine, but the 8th task fails with -ENOMEM in rt_task_create(). I increased the heap size from 128Kb to 256Kb, but the problem persists. If I remove my kernel module and re-load it after a task creation fails, I get an oops in __xntimer_init after starting my first task (which is periodic).
If I build the same code to run in user-space (I have ifdefs allowing me to build it either way), I can create as many tasks as I want and my code behaves exactly as I would expect it to.
I imagine I am probably doing something stupid, but since it works in user mode I'm not sure what to check. Is there a limit of RT kernel tasks? If not, any pointers on how to debug this would be appreciated.
Thanks
Jeff
Quoted 11 lines · Jefferson Noxon
Hello,
This is my first project using Xenomai. I have a Diamond Systems Athena II board with an 800 MHz VIA Mark (Corefusion) chip. I built Xenomai 2.4.5 with Linux kernel 2.6.26.5 and I-pipe 2.0-09.
For some reason I can create 7 kernel tasks just fine, but the 8th task fails with
-ENOMEMinrt_task_create(). I increased the heap size from 128Kb to 256Kb, but the problem persists. If I remove my kernel module and re-load it after a task creation fails, I get an oops in__xntimer_initafter starting my first task (which is periodic).
This should be fix in xenomai 2.4.6.
Quoted 8 lines
If I build the same code to run in user-space (I have ifdefs allowing me to build it either way), I can create as many tasks as I want and my code behaves exactly as I would expect it to.
I imagine I am probably doing something stupid, but since it works in user mode I'm not sure what to check. Is there a limit of RT kernel tasks? If not, any pointers on how to debug this would be appreciated.
Did you try to change the stack pool setting in kernel configuration?
Signature · 1 line
Gilles.
Quoted 11 lines · Gilles Chanteperdrix
Quoted 3 lines · Jefferson Noxon
Hello,
This is my first project using Xenomai. I have a Diamond Systems Athena
II
Quoted 1 line
board with an 800 MHz VIA Mark (Corefusion) chip. I built Xenomai 2.4.5
with
Quoted 4 lines
Linux kernel 2.6.26.5 and I-pipe 2.0-09.
For some reason I can create 7 kernel tasks just fine, but the 8th task fails with
-ENOMEMinrt_task_create(). I increased the heap size from
Quoted 8 lines
128Kb
Quoted 1 line
to 256Kb, but the problem persists. If I remove my kernel module and
re-load
Quoted 2 lines
it after a task creation fails, I get an oops in
__xntimer_initafter starting my first task (which is periodic).This should be fix in xenomai 2.4.6.
Confirmed, thank you.
Quoted 6 lines
Quoted 2 lines
If I build the same code to run in user-space (I have ifdefs allowing me
to
Quoted 3 lines
build it either way), I can create as many tasks as I want and my code behaves exactly as I would expect it to.
Quoted 8 lines
Quoted 1 line
I imagine I am probably doing something stupid, but since it works in
user
Quoted 2 lines
mode I'm not sure what to check. Is there a limit of RT kernel tasks? If not, any pointers on how to debug this would be appreciated.
Did you try to change the stack pool setting in kernel configuration?
That fixed it. Thank you very much. Xenomai is incredible. I was worried about a big learning curve, but I got up and running in almost no time.