[Xenomai-help] [Fwd: Performance decrease]
-------- Forwarded Message --------
Quoted 45 lines
From: Daniel Schnell <[email protected]>
To: xenomai-help <[email protected]>
Subject: Performance decrease
Date: Wed, 30 Aug 2006 11:58:25 -0000Hi,
I have made some CPU throughput tests with/without "Nucleus
options->pervasivereal-time support in user-space" enabled/disabled. And the performance dicrease in using that option is for my processor (MPC5200, 400 MHz) about 10%. On the other side I cannot compile RTDM support in without it; the error message when linking vmlinux at the end of the Kernel compile stage is:drvlib.c:(.text+0x19f8): undefined reference to `__va_to_kva'
For what is the real-time support in user space option good for ?
If it is necessary for RTDM support, shouldn't it be automatically switched on when choosing the RTDM option ?
I am using ELDK-4.0 + latest 2.4.25-developer kernel from Denx + latest subversion xenomai + adeos patch 1.1-04
Thanks in advance,
Ciao,
Daniel.
Signature · 1 line
Philippe.
Quoted 6 lines · Philippe Gerum
-------- Forwarded Message --------
Quoted 5 lines
From: Daniel Schnell <[email protected]>
To: xenomai-help <[email protected]>
Subject: Performance decrease
Date: Wed, 30 Aug 2006 11:58:25 -0000
Quoted 6 lines
Quoted 5 lines
Hi,
I have made some CPU throughput tests with/without "Nucleus
options->pervasivereal-time support in user-space"enabled/disabled. And the performance dicrease in using that option is for my processor (MPC5200, 400 MHz) about 10%.
There is an impact induced by activating the user-space support, since all system calls are filtered through Xenomai; some work is currently undergoing to reduce this overhead, so that only system calls issued by Xenomai shadows would be intercepted. This said, out of curiosity, how do you measure those 10% on your board?
Quoted 7 lines
On the other side I cannot compile RTDM support in without it; the error message when linking vmlinux
at the end of the Kernel compile stage is:Quoted 5 lines
drvlib.c:(.text+0x19f8): undefined reference to `__va_to_kva'
I guess that rtdm_mmap_buffer() should be made dependent on CONFIG_XENO_OPT_PERVASIVE too.
Quoted 6 lines
Quoted 6 lines
For what is the real-time support in user space option good for ?
This allows running Xenomai applications in user-space, instead of implementing them as kernel modules.
Quoted 25 lines
Quoted 25 lines
If it is necessary for RTDM support, shouldn't it be automatically switched on when choosing the RTDM option ?
I am using ELDK-4.0 + latest 2.4.25-developer kernel from Denx + latest subversion xenomai + adeos patch 1.1-04
Thanks in advance,
Ciao,
Daniel.
Signature · 1 line
Philippe.
Quoted 9 lines · Philippe Gerum
Quoted 6 lines
On the other side I cannot compile RTDM support in without it; the error message when linking vmlinux
at the end of the Kernel compile stage is:Quoted 4 lines
drvlib.c:(.text+0x19f8): undefined reference to `__va_to_kva'
I guess that
rtdm_mmap_buffer()should be made dependent onCONFIG_XENO_OPT_PERVASIVEtoo.
True. Will craft some patch.
Quoted 11 lines
Quoted 7 lines
Quoted 7 lines
For what is the real-time support in user space option good for ?
This allows running Xenomai applications in user-space, instead of implementing them as kernel modules.
Everyone planning to write kernel-space drivers and/or applications should keep an eye on some non-technical aspect as well: the license. That's no problem for in-house, unpublished work. But for things that are to be given away / sold, one should recall that the kernel community is more and more considering non-GPL modules in general as a license infringement.
Jan
Quoted 5 lines · Jan Kiszka
Quoted 4 lines · Philippe Gerum
Quoted 4 lines
On the other side I cannot compile RTDM support in without it; the error message when linking vmlinux
at the end of the Kernel compile stage is:Quoted 2 lines
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Quoted 2 lines
drvlib.c:(.text+0x19f8): undefined reference to `__va_to_kva'
I guess that
rtdm_mmap_buffer()should be made dependent onCONFIG_XENO_OPT_PERVASIVEtoo.True. Will craft some patch.
Should be fixed in SVN now.
Jan
Quoted 11 lines · Philippe Gerum
Quoted 10 lines · Philippe Gerum
-------- Forwarded Message --------
Quoted 9 lines
From: Daniel Schnell <[email protected]>
To: xenomai-help <[email protected]>
Subject: Performance decrease
Date: Wed, 30 Aug 2006 11:58:25 -0000Hi,
Quoted 8 lines
Quoted 2 lines
Quoted 1 line
I have made some CPU throughput tests with/without "Nucleus
options->pervasivereal-time support in user-space"enabled/disabled. And the performance dicrease in using that option is for my processor (MPC5200, 400 MHz) about 10%.
There is an impact induced by activating the user-space support, since all system calls are filtered through Xenomai; some work is currently undergoing to reduce this overhead, so that only system calls issued by Xenomai shadows would be intercepted. This said, out of curiosity, how do you measure those 10% on your board?
Just being curious: how will you achieve this ? You will make the function used to dispatch system calls a per-thread pointer ?
Signature · 1 line
Gilles Chanteperdrix.
Quoted 15 lines · Gilles Chanteperdrix
Quoted 14 lines · Philippe Gerum
Quoted 12 lines · Philippe Gerum
-------- Forwarded Message --------
Quoted 10 lines
From: Daniel Schnell <[email protected]>
To: xenomai-help <[email protected]>
Subject: Performance decrease
Date: Wed, 30 Aug 2006 11:58:25 -0000Hi,
I have made some CPU throughput tests with/without "Nucleus
options->pervasivereal-time support in user-space"enabled/disabled. And the performance dicrease in using that option is for my processor (MPC5200, 400 MHz) about 10%.
Quoted 9 lines
Quoted 5 lines
There is an impact induced by activating the user-space support, since all system calls are filtered through Xenomai; some work is currently undergoing to reduce this overhead, so that only system calls issued by Xenomai shadows would be intercepted. This said, out of curiosity, how do you measure those 10% on your board?
Just being curious: how will you achieve this ? You will make the function used to dispatch system calls a per-thread pointer ?
Syscalls are just another form of exceptions, so the change will need to affect all event notifications. A per-thread pointer is an opion provided there is also a mean to install the callback address, so we would also need to intercept the Linux task creation event. Another option would be to define an event filtering routine at domain level, which gets called before the event is pipelined. The latter is a simple and straightforward approach which does not change much of the existing infrastructure, but to remain fast and efficient, the filter should be defined for the domain which notifies events, and not for the domains which get notified, and this would be quite restrictive Adeos-wise, even if this would solve the root issue, Xenomai-wise. To sum up and answer to your initial question: well, I don't know yet.
Signature · 1 line
Philippe.
Quoted 22 lines · Philippe Gerum
Quoted 21 lines · Gilles Chanteperdrix
Quoted 19 lines · Philippe Gerum
Quoted 6 lines · Philippe Gerum
-------- Forwarded Message --------
Quoted 5 lines
From: Daniel Schnell <[email protected]>
To: xenomai-help <[email protected]>
Subject: Performance decrease
Date: Wed, 30 Aug 2006 11:58:25 -0000Quoted 6 lines
Quoted 5 lines
Hi,
I have made some CPU throughput tests with/without "Nucleus
options->pervasivereal-time support in user-space"enabled/disabled. And the performance dicrease in using that option is for my processor (MPC5200, 400 MHz) about 10%.
There is an impact induced by activating the user-space support, since all system calls are filtered through Xenomai; some work is currently undergoing to reduce this overhead, so that only system calls issued by Xenomai shadows would be intercepted. This said, out of curiosity, how do you measure those 10% on your board?
Quoted 8 lines
Quoted 3 lines
Just being curious: how will you achieve this ? You will make the function used to dispatch system calls a per-thread pointer ?
Syscalls are just another form of exceptions, so the change will need to affect all event notifications. A per-thread pointer is an opion provided there is also a mean to install the callback address, so we would also need to intercept the Linux task creation event.
If we continue on this idea. PTD initialization already intercept the Linux task creation event to set the PTDs to 0. Maybe we could dedicate a PTD to mean that a thread is "monitored", so that when an Adeos event occurs, the event only triggers Xenomai callbacks if the thread is monitored (not sure that it would work for the "schedule" event though).
But there is an exception: the "bind" syscall event must be intercepted for threads that are not yet marked as monitored.
Signature · 1 line
Gilles Chanteperdrix.
Quoted 32 lines · Gilles Chanteperdrix
Quoted 22 lines · Philippe Gerum
Quoted 21 lines · Gilles Chanteperdrix
Quoted 19 lines · Philippe Gerum
Quoted 6 lines · Philippe Gerum
-------- Forwarded Message --------
Quoted 5 lines
From: Daniel Schnell <[email protected]>
To: xenomai-help <[email protected]>
Subject: Performance decrease
Date: Wed, 30 Aug 2006 11:58:25 -0000Quoted 6 lines
Quoted 5 lines
Hi,
I have made some CPU throughput tests with/without "Nucleus
options->pervasivereal-time support in user-space"enabled/disabled. And the performance dicrease in using that option is for my processor (MPC5200, 400 MHz) about 10%.
There is an impact induced by activating the user-space support, since all system calls are filtered through Xenomai; some work is currently undergoing to reduce this overhead, so that only system calls issued by Xenomai shadows would be intercepted. This said, out of curiosity, how do you measure those 10% on your board?
Quoted 8 lines
Quoted 3 lines
Just being curious: how will you achieve this ? You will make the function used to dispatch system calls a per-thread pointer ?
Syscalls are just another form of exceptions, so the change will need to affect all event notifications. A per-thread pointer is an opion provided there is also a mean to install the callback address, so we would also need to intercept the Linux task creation event.
Quoted 5 lines
If we continue on this idea. PTD initialization already intercept the Linux task creation event to set the PTDs to 0. Maybe we could dedicate a PTD to mean that a thread is "monitored", so that when an Adeos event occurs, the event only triggers Xenomai callbacks if the thread is monitored
The advantage I see with wiring the callback into the task struct is that it should be easier to handle the binding issue. While we are at it, we could just define an additional callback pointer, no need to recycle ptds.
Quoted 2 lines
(not sure that it would work for the "schedule" event
though).
We want to know all scheduling events anyway, including those involving non-shadows, so that we can make the root thread inherit the right priority (and also engage the interrupt shield as needed).
Quoted 3 lines
But there is an exception: the "bind" syscall event must be intercepted for threads that are not yet marked as monitored.
That's the major issue. We need to keep events flowing to a filtering callback in order to detect binding ops, but without going through the entire pipeline abstraction. And pipelining as it is now must be kept for bound Linux tasks, i.e. shadows. The idea is to save the time spent in the Adeos event dispatcher for tasks that don't need to tell the world about what they are actually doing.
Signature · 1 line
Philippe.
Quoted 10 lines · Philippe Gerum
Quoted 3 lines
But there is an exception: the "bind" syscall event must be intercepted for threads that are not yet marked as monitored.
That's the major issue. We need to keep events flowing to a filtering callback in order to detect binding ops, but without going through the entire pipeline abstraction. And pipelining as it is now must be kept for bound Linux tasks, i.e. shadows. The idea is to save the time spent in the Adeos event dispatcher for tasks that don't need to tell the world about what they are actually doing.
The binding operation could be made a standard Linux operation, such as an ioctl for instance.
Signature · 1 line
Gilles Chanteperdrix.
Quoted 12 lines · Gilles Chanteperdrix
Quoted 10 lines · Philippe Gerum
Quoted 3 lines
But there is an exception: the "bind" syscall event must be intercepted for threads that are not yet marked as monitored.
That's the major issue. We need to keep events flowing to a filtering callback in order to detect binding ops, but without going through the entire pipeline abstraction. And pipelining as it is now must be kept for bound Linux tasks, i.e. shadows. The idea is to save the time spent in the Adeos event dispatcher for tasks that don't need to tell the world about what they are actually doing.
Quoted 3 lines
The binding operation could be made a standard Linux operation, such as an ioctl for instance.
Yes. We would have to define another character device node, but since we are going to need this for Xenomai3, we would only be anticipating the requirement anyway.
PS: moving this discussion to xenomai-core.
Signature · 1 line
Philippe.