All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] RTDM API: no CPU binding, FPU setting for tasks available?
@ 2012-11-07 19:06 Michael Haberler
  2012-11-07 19:16 ` Wolfgang Grandegger
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Haberler @ 2012-11-07 19:06 UTC (permalink / raw)
  To: xenomai

As suggested, I adapted the LinuxCNC kernel support from native to RTDM API; my remaining issues are:

- how do I achieve CPU binding which is available in rt_task_create() (T_CPU(cpuid))?
- do I need to tell an RTDM task that the thread might use the FPU (T_FPU in rt_task_create()) ?

thanks in advance,

Michael




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Xenomai] RTDM API: no CPU binding, FPU setting for tasks available?
  2012-11-07 19:06 [Xenomai] RTDM API: no CPU binding, FPU setting for tasks available? Michael Haberler
@ 2012-11-07 19:16 ` Wolfgang Grandegger
  2012-11-07 19:26   ` Michael Haberler
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Grandegger @ 2012-11-07 19:16 UTC (permalink / raw)
  To: Michael Haberler; +Cc: xenomai

On 11/07/2012 08:06 PM, Michael Haberler wrote:
> As suggested, I adapted the LinuxCNC kernel support from native to RTDM API; my remaining issues are:
> 
> - how do I achieve CPU binding which is available in rt_task_create() (T_CPU(cpuid))?
> - do I need to tell an RTDM task that the thread might use the FPU (T_FPU in rt_task_create()) ?

http://www.xenomai.org/documentation/trunk/html/api/group__task.html#ga03387550693c21d0223f739570ccd992
it pretty clear.
 
Wolfgang.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Xenomai] RTDM API: no CPU binding, FPU setting for tasks available?
  2012-11-07 19:16 ` Wolfgang Grandegger
@ 2012-11-07 19:26   ` Michael Haberler
  2012-11-07 19:44     ` Gilles Chanteperdrix
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Haberler @ 2012-11-07 19:26 UTC (permalink / raw)
  To: Wolfgang Grandegger; +Cc: xenomai


Am 07.11.2012 um 20:16 schrieb Wolfgang Grandegger:

> On 11/07/2012 08:06 PM, Michael Haberler wrote:
>> As suggested, I adapted the LinuxCNC kernel support from native to RTDM API; my remaining issues are:
>> 
>> - how do I achieve CPU binding which is available in rt_task_create() (T_CPU(cpuid))?
>> - do I need to tell an RTDM task that the thread might use the FPU (T_FPU in rt_task_create()) ?
> 
> http://www.xenomai.org/documentation/trunk/html/api/group__task.html#ga03387550693c21d0223f739570ccd992
> it pretty clear.

Wolfgang -

I was suggested:

> Also note that if LinuxCNC code runs in kernel-space, you should not be
> using the native API, but the RTDM API.

which I translate as 'use rtdm_task_init instead of rt_task_create'

I have the kernel code using the native API just fine. The concern I have is for long-term compatibility, which is why I'm attempting to port to RTDM.

- Michael


> 
> Wolfgang.
> 



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Xenomai] RTDM API: no CPU binding, FPU setting for tasks available?
  2012-11-07 19:26   ` Michael Haberler
@ 2012-11-07 19:44     ` Gilles Chanteperdrix
  2012-11-07 20:17       ` Michael Haberler
  0 siblings, 1 reply; 7+ messages in thread
From: Gilles Chanteperdrix @ 2012-11-07 19:44 UTC (permalink / raw)
  To: Michael Haberler; +Cc: xenomai

On 11/07/2012 08:26 PM, Michael Haberler wrote:

> 
> Am 07.11.2012 um 20:16 schrieb Wolfgang Grandegger:
> 
>> On 11/07/2012 08:06 PM, Michael Haberler wrote:
>>> As suggested, I adapted the LinuxCNC kernel support from native
>>> to RTDM API; my remaining issues are:
>>> 
>>> - how do I achieve CPU binding which is available in
>>> rt_task_create() (T_CPU(cpuid))? - do I need to tell an RTDM task
>>> that the thread might use the FPU (T_FPU in rt_task_create()) ?
>> 
>> http://www.xenomai.org/documentation/trunk/html/api/group__task.html#ga03387550693c21d0223f739570ccd992
>>
>> 


it pretty clear.

> 
> Wolfgang -
> 
> I was suggested:
> 
>> Also note that if LinuxCNC code runs in kernel-space, you should
>> not be using the native API, but the RTDM API.
> 
> which I translate as 'use rtdm_task_init instead of rt_task_create'
> 
> I have the kernel code using the native API just fine. The concern I
> have is for long-term compatibility, which is why I'm attempting to
> port to RTDM.


In xenomai 3.0, FPU in kernel-space will not be supported. But it is
true that we lack a service to set affinity for RTDM tasks. Though if
you are creating the task from a linux context (module initialization
function, or linux kernel threas), you can probably use set_cpus_allowed
before rtdm_task_init to get the task created on the target cpu (set
call it again after to restore the mask).

-- 
                                                                Gilles.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Xenomai] RTDM API: no CPU binding, FPU setting for tasks available?
  2012-11-07 19:44     ` Gilles Chanteperdrix
@ 2012-11-07 20:17       ` Michael Haberler
  2012-11-07 20:28         ` Gilles Chanteperdrix
  2012-11-07 22:40         ` Lennart Sorensen
  0 siblings, 2 replies; 7+ messages in thread
From: Michael Haberler @ 2012-11-07 20:17 UTC (permalink / raw)
  To: xenomai


Am 07.11.2012 um 20:44 schrieb Gilles Chanteperdrix:

>>> On 11/07/2012 08:06 PM, Michael Haberler wrote:
>>>> As suggested, I adapted the LinuxCNC kernel support from native
...

> In xenomai 3.0, FPU in kernel-space will not be supported. But it is

that I wasnt aware of, and it is quite a showstopper for me - I wish I had known before and saved the time. It puts in question any plans to release the kernel mode port of LinuxCNC altogether.

You _do_ want to add that fact to the Xenomai Roadmap _badly_.

what would be a realistic 'useful remaing life expectancy' for Xenomai 2.x? 1,2,3 years? 

- Michael

> true that we lack a service to set affinity for RTDM tasks. Though if
> you are creating the task from a linux context (module initialization
> function, or linux kernel threas), you can probably use set_cpus_allowed
> before rtdm_task_init to get the task created on the target cpu (set
> call it again after to restore the mask).
> 
> -- 
>                                                                Gilles.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Xenomai] RTDM API: no CPU binding, FPU setting for tasks available?
  2012-11-07 20:17       ` Michael Haberler
@ 2012-11-07 20:28         ` Gilles Chanteperdrix
  2012-11-07 22:40         ` Lennart Sorensen
  1 sibling, 0 replies; 7+ messages in thread
From: Gilles Chanteperdrix @ 2012-11-07 20:28 UTC (permalink / raw)
  To: Michael Haberler; +Cc: xenomai

On 11/07/2012 09:17 PM, Michael Haberler wrote:

> 
> Am 07.11.2012 um 20:44 schrieb Gilles Chanteperdrix:
> 
>>>> On 11/07/2012 08:06 PM, Michael Haberler wrote:
>>>>> As suggested, I adapted the LinuxCNC kernel support from native
> ...
> 
>> In xenomai 3.0, FPU in kernel-space will not be supported. But it is
> 
> that I wasnt aware of, and it is quite a showstopper for me - I wish I had known before and saved the time. It puts in question any plans to release the kernel mode port of LinuxCNC altogether.
> 
> You _do_ want to add that fact to the Xenomai Roadmap _badly_.


Well, it has been discussed several times on this mailing list.

> 
> what would be a realistic 'useful remaing life expectancy' for Xenomai 2.x? 1,2,3 years? 


There is no plan to abandon 2.x, only at some point (probably around the
time when the first xenomai 3.0 release will happen) only upgrades to
new kernel versions will happen, new functionalities will not be developed.

-- 
                                                                Gilles.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Xenomai] RTDM API: no CPU binding, FPU setting for tasks available?
  2012-11-07 20:17       ` Michael Haberler
  2012-11-07 20:28         ` Gilles Chanteperdrix
@ 2012-11-07 22:40         ` Lennart Sorensen
  1 sibling, 0 replies; 7+ messages in thread
From: Lennart Sorensen @ 2012-11-07 22:40 UTC (permalink / raw)
  To: Michael Haberler; +Cc: xenomai

On Wed, Nov 07, 2012 at 09:17:14PM +0100, Michael Haberler wrote:
> that I wasnt aware of, and it is quite a showstopper for me - I wish I had known before and saved the time. It puts in question any plans to release the kernel mode port of LinuxCNC altogether.
> 
> You _do_ want to add that fact to the Xenomai Roadmap _badly_.
> 
> what would be a realistic 'useful remaing life expectancy' for Xenomai 2.x? 1,2,3 years? 

Well Linux has always been highly anti FPU in kernel mode, and Xenomai
3 seems to drop the idea of doing anything in kernel mode if possible,
so since all your real time code should be in user space anyhow, there
should not be any FPU issues.

There have also been interesting bugs to do with FPU in xenomai 2.x
under certain corner cases that have been entertaining to track down,
although I don't remember if any had to do with user space versus kernel
space or not.

-- 
Len Sorensen


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-11-07 22:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-07 19:06 [Xenomai] RTDM API: no CPU binding, FPU setting for tasks available? Michael Haberler
2012-11-07 19:16 ` Wolfgang Grandegger
2012-11-07 19:26   ` Michael Haberler
2012-11-07 19:44     ` Gilles Chanteperdrix
2012-11-07 20:17       ` Michael Haberler
2012-11-07 20:28         ` Gilles Chanteperdrix
2012-11-07 22:40         ` Lennart Sorensen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.