All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] Question about synchronisation between xenomai task and linux task
@ 2015-12-14 14:56 =?gb18030?B?pcul46Xz0MfIyw==?=
  2015-12-14 22:35 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 4+ messages in thread
From: =?gb18030?B?pcul46Xz0MfIyw==?= @ 2015-12-14 14:56 UTC (permalink / raw)
  To: =?gb18030?B?eGVub21haQ==?=

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb18030", Size: 1436 bytes --]

Hello, sorry to bother you. I have some questions about synchronisation. I am very eager for your help. 


    I have read the source code file like rtipc.c, xddp.c, bufp.c, iddp.c, and pipe.c. Now I am wondering if there is a simple and effective way of synchronisation between xenomai task and linux task in user space and kernel space.


    I found most of synchronisation service introduced in Xenomai 3 Programmer¡¯s Reference Manual could be only used in xenomai task, linux task can not use these synchronisation service. If I use linux synchronisation service like mutex in xenomai task, xenomai task would switch to secondary mode which would cost a lot of time. So I want to know how to synchronize xenomai task and linux task in user space.
o


    As I mentioned above, I have read the source code file like rtipc.c, xddp.c, bufp.c, iddp.c, I know lots of functions were realized in linux kernel modules as rtdm devices, both xenomai task and linux task could call these functions by rtdm interface. In kernel space, Synchronisation Services was used to synchronize between xenomai tasks, xnapc and wait_queue_head_t were used to synchronize between xenomai task and linux task. I am wondering if there is a simple to synchronize between xenomai task and linux task directly in kernel space.


    I'am a rookie of xenomai. It might be simple questions in your opinion. I would appreciate it if you could help.

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

* Re: [Xenomai] Question about synchronisation between xenomai task and linux task
  2015-12-14 14:56 [Xenomai] Question about synchronisation between xenomai task and linux task =?gb18030?B?pcul46Xz0MfIyw==?=
@ 2015-12-14 22:35 ` Gilles Chanteperdrix
  2015-12-15  3:42   ` [Xenomai] =?gb18030?q?=BB=D8=B8=B4=A3=BA__Question_about_synchronisation_between_xenomai_taskand_linux_task?= =?gb18030?B?pcul46Xz0MfIyw==?=
  0 siblings, 1 reply; 4+ messages in thread
From: Gilles Chanteperdrix @ 2015-12-14 22:35 UTC (permalink / raw)
  To: ニャン星人; +Cc: xenomai

On Mon, Dec 14, 2015 at 10:56:40PM +0800, ニャン星人 wrote:
> Hello, sorry to bother you. I have some questions about synchronisation. I am very eager for your help. 
> 
> 
> I have read the source code file like rtipc.c, xddp.c, bufp.c,
> iddp.c, and pipe.c. Now I am wondering if there is a simple
> and effective way of synchronisation between xenomai task and
> linux task in user space and kernel space.
> 
> 
> I found most of synchronisation service introduced in Xenomai
> 3 Programmer¡¯s Reference Manual could be only used in xenomai
> task, linux task can not use these synchronisation service. If I
> use linux synchronisation service like mutex in xenomai task,
> xenomai task would switch to secondary mode which would cost a lot
> of time. So I want to know how to synchronize xenomai task and
> linux task in user space. o
> 
> 
> As I mentioned above, I have read the source code file like
> rtipc.c, xddp.c, bufp.c, iddp.c, I know lots of functions were
> realized in linux kernel modules as rtdm devices, both xenomai
> task and linux task could call these functions by rtdm
> interface. In kernel space, Synchronisation Services was used
> to synchronize between xenomai tasks, xnapc and
> wait_queue_head_t were used to synchronize between xenomai
> task and linux task. I am wondering if there is a simple to
> synchronize between xenomai task and linux task directly in
> kernel space.
> 
> 
> I'am a rookie of xenomai. It might be simple questions in your
> opinion. I would appreciate it if you could help.

The xddp sockets allow exchanging message between Xenomai and Linux
threads. Synchronizing per-se is complicated because the two types
of threads are scheduled by different schedulers.

> _______________________________________________ Xenomai mailing
> list Xenomai@xenomai.org
> http://xenomai.org/mailman/listinfo/xenomai

-- 
					    Gilles.
https://click-hack.org


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

* [Xenomai] =?gb18030?q?=BB=D8=B8=B4=A3=BA__Question_about_synchronisation_between_xenomai_taskand_linux_task?=
  2015-12-14 22:35 ` Gilles Chanteperdrix
@ 2015-12-15  3:42   ` =?gb18030?B?pcul46Xz0MfIyw==?=
  2015-12-15  6:21     ` [Xenomai] 回复: Question about synchronisation between xenomai taskand linux task Gilles Chanteperdrix
  0 siblings, 1 reply; 4+ messages in thread
From: =?gb18030?B?pcul46Xz0MfIyw==?= @ 2015-12-15  3:42 UTC (permalink / raw)
  To: =?gb18030?B?R2lsbGVzIENoYW50ZXBlcmRyaXg=?=; +Cc: =?gb18030?B?eGVub21haQ==?=

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb18030", Size: 2574 bytes --]

So you mean there is not simple and complete solution way apply by xenomai to figure out the synchronization problem between xenomai thread and linux thread? When I meet synchronization problem between xenomai thread and linux thread, do I have to handle it like xddp and pipe?




------------------ ԭʼÓʼþ ------------------
·¢¼þÈË: "Gilles Chanteperdrix"<gilles.chanteperdrix@xenomai.org>; 
·¢ËÍʱ¼ä: 2015Äê12ÔÂ15ÈÕ(ÐÇÆÚ¶þ) ÉÏÎç6:35
ÊÕ¼þÈË: "¥Ë¥ã¥óÐÇÈË"<1173264124@qq.com>; 
³­ËÍ: "xenomai"<xenomai@xenomai.org>; 
Ö÷Ìâ: Re: [Xenomai] Question about synchronisation between xenomai taskand linux task



On Mon, Dec 14, 2015 at 10:56:40PM +0800, ¥Ë¥ã¥óÐÇÈË wrote:
> Hello, sorry to bother you. I have some questions about synchronisation. I am very eager for your help. 
> 
> 
> I have read the source code file like rtipc.c, xddp.c, bufp.c,
> iddp.c, and pipe.c. Now I am wondering if there is a simple
> and effective way of synchronisation between xenomai task and
> linux task in user space and kernel space.
> 
> 
> I found most of synchronisation service introduced in Xenomai
> 3 Programmer0„30…4s Reference Manual could be only used in xenomai
> task, linux task can not use these synchronisation service. If I
> use linux synchronisation service like mutex in xenomai task,
> xenomai task would switch to secondary mode which would cost a lot
> of time. So I want to know how to synchronize xenomai task and
> linux task in user space. o
> 
> 
> As I mentioned above, I have read the source code file like
> rtipc.c, xddp.c, bufp.c, iddp.c, I know lots of functions were
> realized in linux kernel modules as rtdm devices, both xenomai
> task and linux task could call these functions by rtdm
> interface. In kernel space, Synchronisation Services was used
> to synchronize between xenomai tasks, xnapc and
> wait_queue_head_t were used to synchronize between xenomai
> task and linux task. I am wondering if there is a simple to
> synchronize between xenomai task and linux task directly in
> kernel space.
> 
> 
> I'am a rookie of xenomai. It might be simple questions in your
> opinion. I would appreciate it if you could help.

The xddp sockets allow exchanging message between Xenomai and Linux
threads. Synchronizing per-se is complicated because the two types
of threads are scheduled by different schedulers.

> _______________________________________________ Xenomai mailing
> list Xenomai@xenomai.org
> http://xenomai.org/mailman/listinfo/xenomai

-- 
					    Gilles.
https://click-hack.org

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

* Re: [Xenomai] 回复:  Question about synchronisation between xenomai taskand linux task
  2015-12-15  3:42   ` [Xenomai] =?gb18030?q?=BB=D8=B8=B4=A3=BA__Question_about_synchronisation_between_xenomai_taskand_linux_task?= =?gb18030?B?pcul46Xz0MfIyw==?=
@ 2015-12-15  6:21     ` Gilles Chanteperdrix
  0 siblings, 0 replies; 4+ messages in thread
From: Gilles Chanteperdrix @ 2015-12-15  6:21 UTC (permalink / raw)
  To: ニャン星人; +Cc: xenomai

On Tue, Dec 15, 2015 at 11:42:44AM +0800, ニャン星人 wrote:
> So you mean there is not simple and complete solution way apply by
> xenomai to figure out the synchronization problem between xenomai
> thread and linux thread? When I meet synchronization problem
> between xenomai thread and linux thread, do I have to handle it
> like xddp and pipe?

The solution which strictly does what you want is xddp. (rt_pipe is
deprecated, and linux pipes will cause both ends to switch to
secondary mode).

But you may consider using a Xenomai only synchronization primitive
(such as semaphores, message queues, etc...), and have the non
real-time thread be a Xenomai thread oscillating between primary and
secondary mode. Using the SCHED_OTHER or SCHED_WEAK policy for such
a thread should help.

-- 
					    Gilles.
https://click-hack.org


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

end of thread, other threads:[~2015-12-15  6:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-14 14:56 [Xenomai] Question about synchronisation between xenomai task and linux task =?gb18030?B?pcul46Xz0MfIyw==?=
2015-12-14 22:35 ` Gilles Chanteperdrix
2015-12-15  3:42   ` [Xenomai] =?gb18030?q?=BB=D8=B8=B4=A3=BA__Question_about_synchronisation_between_xenomai_taskand_linux_task?= =?gb18030?B?pcul46Xz0MfIyw==?=
2015-12-15  6:21     ` [Xenomai] 回复: Question about synchronisation between xenomai taskand linux task Gilles Chanteperdrix

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.