All of lore.kernel.org
 help / color / mirror / Atom feed
* [Priority Inheritance] SCHED_FIFO or SCHED_RR?
@ 2011-09-27 23:06 Tadeus (Eus) Prastowo
  2011-09-28 12:38 ` Tadeus (Eus) Prastowo
  2011-09-30 19:12 ` Tadeus (Eus) Prastowo
  0 siblings, 2 replies; 8+ messages in thread
From: Tadeus (Eus) Prastowo @ 2011-09-27 23:06 UTC (permalink / raw)
  To: linux-kernel

Hi!

When a SCHED_RR task with RT priority X blocks on a
priority-inheriting mutex held by a SCHED_NORMAL task with nice value
Y, RT-Mutex code will change the SCHED_NORMAL task priority to that of
the SCHED_RR task and based on the new priority, will change the
scheduling class too. But, each task retains its own scheduling
policy.

This means that the task inheriting the SCHED_RR priority will be
scheduled using SCHED_FIFO policy because task_tick_rt does not
enforce the SCHED_RR time slice when the task policy is not SCHED_RR.

Why should a SCHED_NORMAL task inheriting the priority of a SCHED_RR
task get the privilege of SCHED_FIFO task for running as long as it
wishes even when the task giving the inheritance does not have such
privilege?

Thank you very much.

Please kindly put me in the CC since I am not subscribed to the list.

--
Eus

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

* Re: [Priority Inheritance] SCHED_FIFO or SCHED_RR?
  2011-09-27 23:06 [Priority Inheritance] SCHED_FIFO or SCHED_RR? Tadeus (Eus) Prastowo
@ 2011-09-28 12:38 ` Tadeus (Eus) Prastowo
  2011-09-30 19:12 ` Tadeus (Eus) Prastowo
  1 sibling, 0 replies; 8+ messages in thread
From: Tadeus (Eus) Prastowo @ 2011-09-28 12:38 UTC (permalink / raw)
  To: linux-kernel

Ping :)

On Wed, Sep 28, 2011 at 1:06 AM, Tadeus (Eus) Prastowo
<0x657573@googlemail.com> wrote:
> Hi!
>
> When a SCHED_RR task with RT priority X blocks on a
> priority-inheriting mutex held by a SCHED_NORMAL task with nice value
> Y, RT-Mutex code will change the SCHED_NORMAL task priority to that of
> the SCHED_RR task and based on the new priority, will change the
> scheduling class too. But, each task retains its own scheduling
> policy.
>
> This means that the task inheriting the SCHED_RR priority will be
> scheduled using SCHED_FIFO policy because task_tick_rt does not
> enforce the SCHED_RR time slice when the task policy is not SCHED_RR.
>
> Why should a SCHED_NORMAL task inheriting the priority of a SCHED_RR
> task get the privilege of SCHED_FIFO task for running as long as it
> wishes even when the task giving the inheritance does not have such
> privilege?
>
> Thank you very much.
>
> Please kindly put me in the CC since I am not subscribed to the list.
>
> --
> Eus

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

* Re: [Priority Inheritance] SCHED_FIFO or SCHED_RR?
  2011-09-27 23:06 [Priority Inheritance] SCHED_FIFO or SCHED_RR? Tadeus (Eus) Prastowo
  2011-09-28 12:38 ` Tadeus (Eus) Prastowo
@ 2011-09-30 19:12 ` Tadeus (Eus) Prastowo
  2011-10-01  5:41   ` Mike Galbraith
  1 sibling, 1 reply; 8+ messages in thread
From: Tadeus (Eus) Prastowo @ 2011-09-30 19:12 UTC (permalink / raw)
  To: linux-kernel

Anyone familiar with the Linux scheduler, please?

On Wed, Sep 28, 2011 at 1:06 AM, Tadeus (Eus) Prastowo
<0x657573@googlemail.com> wrote:
> Hi!
>
> When a SCHED_RR task with RT priority X blocks on a
> priority-inheriting mutex held by a SCHED_NORMAL task with nice value
> Y, RT-Mutex code will change the SCHED_NORMAL task priority to that of
> the SCHED_RR task and based on the new priority, will change the
> scheduling class too. But, each task retains its own scheduling
> policy.
>
> This means that the task inheriting the SCHED_RR priority will be
> scheduled using SCHED_FIFO policy because task_tick_rt does not
> enforce the SCHED_RR time slice when the task policy is not SCHED_RR.
>
> Why should a SCHED_NORMAL task inheriting the priority of a SCHED_RR
> task get the privilege of SCHED_FIFO task for running as long as it
> wishes even when the task giving the inheritance does not have such
> privilege?
>
> Thank you very much.
>
> Please kindly put me in the CC since I am not subscribed to the list.
>
> --
> Eus

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

* Re: [Priority Inheritance] SCHED_FIFO or SCHED_RR?
  2011-09-30 19:12 ` Tadeus (Eus) Prastowo
@ 2011-10-01  5:41   ` Mike Galbraith
  2011-10-01 20:29     ` Tadeus (Eus) Prastowo
  0 siblings, 1 reply; 8+ messages in thread
From: Mike Galbraith @ 2011-10-01  5:41 UTC (permalink / raw)
  To: Tadeus (Eus) Prastowo; +Cc: linux-kernel

On Fri, 2011-09-30 at 21:12 +0200, Tadeus (Eus) Prastowo wrote:
> Anyone familiar with the Linux scheduler, please?
> 
> On Wed, Sep 28, 2011 at 1:06 AM, Tadeus (Eus) Prastowo
> <0x657573@googlemail.com> wrote:
> > Hi!
> >
> > When a SCHED_RR task with RT priority X blocks on a
> > priority-inheriting mutex held by a SCHED_NORMAL task with nice value
> > Y, RT-Mutex code will change the SCHED_NORMAL task priority to that of
> > the SCHED_RR task and based on the new priority, will change the
> > scheduling class too. But, each task retains its own scheduling
> > policy.
> >
> > This means that the task inheriting the SCHED_RR priority will be
> > scheduled using SCHED_FIFO policy because task_tick_rt does not
> > enforce the SCHED_RR time slice when the task policy is not SCHED_RR.
> >
> > Why should a SCHED_NORMAL task inheriting the priority of a SCHED_RR
> > task get the privilege of SCHED_FIFO task for running as long as it
> > wishes even when the task giving the inheritance does not have such
> > privilege?

Existence of a critical section > slice would be the real problem, no?

	-Mike


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

* Re: [Priority Inheritance] SCHED_FIFO or SCHED_RR?
  2011-10-01  5:41   ` Mike Galbraith
@ 2011-10-01 20:29     ` Tadeus (Eus) Prastowo
  2011-10-01 20:31       ` Tadeus (Eus) Prastowo
  2011-10-02  7:50       ` Mike Galbraith
  0 siblings, 2 replies; 8+ messages in thread
From: Tadeus (Eus) Prastowo @ 2011-10-01 20:29 UTC (permalink / raw)
  To: Mike Galbraith; +Cc: linux-kernel

On Sat, Oct 1, 2011 at 7:41 AM, Mike Galbraith <efault@gmx.de> wrote:
> On Fri, 2011-09-30 at 21:12 +0200, Tadeus (Eus) Prastowo wrote:
>> > Why should a SCHED_NORMAL task inheriting the priority of a SCHED_RR
>> > task get the privilege of SCHED_FIFO task for running as long as it
>> > wishes even when the task giving the inheritance does not have such
>> > privilege?
>
> Existence of a critical section > slice would be the real problem, no?

No, it's not a problem because if a real-time system designer puts a
real-time task under SCHED_RR, he will calculate the length of the
critical section by taking into account the slice.

For the case of one SCHED_RR task sharing a critical section with one
SCHED_NORMAL task, the worst-case blocking time of the SCHED_RR task
is found by multiplying the critical section execution time taking
into account the slice by two.

>        -Mike

-- 
Eus

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

* Re: [Priority Inheritance] SCHED_FIFO or SCHED_RR?
  2011-10-01 20:29     ` Tadeus (Eus) Prastowo
@ 2011-10-01 20:31       ` Tadeus (Eus) Prastowo
  2011-10-02  7:50       ` Mike Galbraith
  1 sibling, 0 replies; 8+ messages in thread
From: Tadeus (Eus) Prastowo @ 2011-10-01 20:31 UTC (permalink / raw)
  To: Mike Galbraith; +Cc: linux-kernel

On Sat, Oct 1, 2011 at 10:29 PM, Tadeus (Eus) Prastowo
<0x657573@googlemail.com> wrote:
> For the case of one SCHED_RR task sharing a critical section with one
> SCHED_NORMAL task, the worst-case blocking time of the SCHED_RR task
> is found by multiplying the critical section execution time taking
> into account the slice by two.

Sorry, the worst-case blocking time is just the critical section
execution time taking into account the slice.

>>        -Mike
>
> --
> Eus

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

* Re: [Priority Inheritance] SCHED_FIFO or SCHED_RR?
  2011-10-01 20:29     ` Tadeus (Eus) Prastowo
  2011-10-01 20:31       ` Tadeus (Eus) Prastowo
@ 2011-10-02  7:50       ` Mike Galbraith
  2011-10-02 15:32         ` Tadeus (Eus) Prastowo
  1 sibling, 1 reply; 8+ messages in thread
From: Mike Galbraith @ 2011-10-02  7:50 UTC (permalink / raw)
  To: Tadeus (Eus) Prastowo; +Cc: linux-kernel

On Sat, 2011-10-01 at 22:29 +0200, Tadeus (Eus) Prastowo wrote:
> On Sat, Oct 1, 2011 at 7:41 AM, Mike Galbraith <efault@gmx.de> wrote:
> > On Fri, 2011-09-30 at 21:12 +0200, Tadeus (Eus) Prastowo wrote:
> >> > Why should a SCHED_NORMAL task inheriting the priority of a SCHED_RR
> >> > task get the privilege of SCHED_FIFO task for running as long as it
> >> > wishes even when the task giving the inheritance does not have such
> >> > privilege?
> >
> > Existence of a critical section > slice would be the real problem, no?
> 
> No, it's not a problem because if a real-time system designer puts a
> real-time task under SCHED_RR, he will calculate the length of the
> critical section by taking into account the slice.

Submit a patch, and see if it flies.

	-Mike


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

* Re: [Priority Inheritance] SCHED_FIFO or SCHED_RR?
  2011-10-02  7:50       ` Mike Galbraith
@ 2011-10-02 15:32         ` Tadeus (Eus) Prastowo
  0 siblings, 0 replies; 8+ messages in thread
From: Tadeus (Eus) Prastowo @ 2011-10-02 15:32 UTC (permalink / raw)
  To: Mike Galbraith; +Cc: linux-kernel

On Sun, Oct 2, 2011 at 9:50 AM, Mike Galbraith <efault@gmx.de> wrote:
> On Sat, 2011-10-01 at 22:29 +0200, Tadeus (Eus) Prastowo wrote:
>> On Sat, Oct 1, 2011 at 7:41 AM, Mike Galbraith <efault@gmx.de> wrote:
>> > On Fri, 2011-09-30 at 21:12 +0200, Tadeus (Eus) Prastowo wrote:
>> >> > Why should a SCHED_NORMAL task inheriting the priority of a SCHED_RR
>> >> > task get the privilege of SCHED_FIFO task for running as long as it
>> >> > wishes even when the task giving the inheritance does not have such
>> >> > privilege?
>> >
>> > Existence of a critical section > slice would be the real problem, no?
>>
>> No, it's not a problem because if a real-time system designer puts a
>> real-time task under SCHED_RR, he will calculate the length of the
>> critical section by taking into account the slice.
>
> Submit a patch, and see if it flies.

Okay, thank you for the direction. It seems that only with a patch I
can get the answer ;-)

>        -Mike

--
Eus

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

end of thread, other threads:[~2011-10-02 15:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-27 23:06 [Priority Inheritance] SCHED_FIFO or SCHED_RR? Tadeus (Eus) Prastowo
2011-09-28 12:38 ` Tadeus (Eus) Prastowo
2011-09-30 19:12 ` Tadeus (Eus) Prastowo
2011-10-01  5:41   ` Mike Galbraith
2011-10-01 20:29     ` Tadeus (Eus) Prastowo
2011-10-01 20:31       ` Tadeus (Eus) Prastowo
2011-10-02  7:50       ` Mike Galbraith
2011-10-02 15:32         ` Tadeus (Eus) Prastowo

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.