All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] Q on scheduling - rt_task_wait_period vs rtdm_wait_event
@ 2015-06-07 12:39 Michael Haberler
  2015-06-07 14:42 ` Philippe Gerum
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Haberler @ 2015-06-07 12:39 UTC (permalink / raw)
  To: xenomai

so far  we had multiple periodic RT threads of different priority, so a
lower-priority thread would not preempt a higher-priority one

we are switching the scheduling of a low-priority thread from periodic to
event-based - instead of rt_task_wait_period(), this task will now wait in
an RTDM driver ioctl in rtdm_event_wait()

I assume the following to be true:

even if the rtdm_even_wait() terminates while a higher priority thread is
running, the lower priority thread will not be scheduled until all
higher-priority threads have entered rt_task_wait_period().

correct?

thanks in advance,

Michael

background: we're synchronizing an RT thread to an external timing
reference, for now a GPIO interrupt, starting from here:
https://github.com/mhaberler/gpio-irq-rtdm

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

* Re: [Xenomai] Q on scheduling - rt_task_wait_period vs rtdm_wait_event
  2015-06-07 12:39 [Xenomai] Q on scheduling - rt_task_wait_period vs rtdm_wait_event Michael Haberler
@ 2015-06-07 14:42 ` Philippe Gerum
  2015-06-08  9:28   ` Michael Haberler
  0 siblings, 1 reply; 3+ messages in thread
From: Philippe Gerum @ 2015-06-07 14:42 UTC (permalink / raw)
  To: Michael Haberler, xenomai

On 06/07/2015 02:39 PM, Michael Haberler wrote:
> so far  we had multiple periodic RT threads of different priority, so a
> lower-priority thread would not preempt a higher-priority one
> 
> we are switching the scheduling of a low-priority thread from periodic to
> event-based - instead of rt_task_wait_period(), this task will now wait in
> an RTDM driver ioctl in rtdm_event_wait()
> 
> I assume the following to be true:
> 
> even if the rtdm_even_wait() terminates while a higher priority thread is
> running, the lower priority thread will not be scheduled until all
> higher-priority threads have entered rt_task_wait_period().
> 
> correct?
> 

Yes, assuming SCHED_FIFO for all of these threads. There is no reason
for implicitly changing the priority of a sleeper as a result of waking
it up from a blocking service.

-- 
Philippe.


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

* Re: [Xenomai] Q on scheduling - rt_task_wait_period vs rtdm_wait_event
  2015-06-07 14:42 ` Philippe Gerum
@ 2015-06-08  9:28   ` Michael Haberler
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Haberler @ 2015-06-08  9:28 UTC (permalink / raw)
  To: Philippe Gerum; +Cc: xenomai


> Am 07.06.2015 um 16:42 schrieb Philippe Gerum <rpm@xenomai.org>:
> 
> On 06/07/2015 02:39 PM, Michael Haberler wrote:
>> so far  we had multiple periodic RT threads of different priority, so a
>> lower-priority thread would not preempt a higher-priority one
>> 
>> we are switching the scheduling of a low-priority thread from periodic to
>> event-based - instead of rt_task_wait_period(), this task will now wait in
>> an RTDM driver ioctl in rtdm_event_wait()
>> 
>> I assume the following to be true:
>> 
>> even if the rtdm_even_wait() terminates while a higher priority thread is
>> running, the lower priority thread will not be scheduled until all
>> higher-priority threads have entered rt_task_wait_period().
>> 
>> correct?
>> 
> 
> Yes, assuming SCHED_FIFO for all of these threads. There is no reason
> for implicitly changing the priority of a sleeper as a result of waking
> it up from a blocking service.

thanks! yes, SCHED_FIFO used here. Just preventing a possible blunder ;)


> 
> -- 
> Philippe.



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

end of thread, other threads:[~2015-06-08  9:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-07 12:39 [Xenomai] Q on scheduling - rt_task_wait_period vs rtdm_wait_event Michael Haberler
2015-06-07 14:42 ` Philippe Gerum
2015-06-08  9:28   ` Michael Haberler

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.