Re: [RFC PATCH 1/6] sched/fair: check_preempt_wakeup: Fix assumption on the default policy

2016-09-20 Thread Julien Desfossez
On 21-Sep-2016 12:56:32 AM, Thomas Gleixner wrote: > On Tue, 20 Sep 2016, Mathieu Desnoyers wrote: > > So what is then puzzling us is this: > > > > rt_mutex_setprio() > > > > if (dl_prio(prio)) { > > struct task_struct *pi_task = rt_mutex_get_top_task(p); > >

Re: [RFC PATCH 1/6] sched/fair: check_preempt_wakeup: Fix assumption on the default policy

2016-09-20 Thread Thomas Gleixner
On Tue, 20 Sep 2016, Mathieu Desnoyers wrote: > So what is then puzzling us is this: > > rt_mutex_setprio() > > if (dl_prio(prio)) { > struct task_struct *pi_task = rt_mutex_get_top_task(p); > if (!dl_prio(p->normal_prio) || > (pi_task &

Re: [RFC PATCH 1/6] sched/fair: check_preempt_wakeup: Fix assumption on the default policy

2016-09-20 Thread Mathieu Desnoyers
- On Sep 20, 2016, at 4:49 PM, Thomas Gleixner t...@linutronix.de wrote: > On Fri, 16 Sep 2016, Julien Desfossez wrote: > >> Tasks with RT or deadline scheduling class may inherit from a task with >> a "fair" scheduling class. > > This makes no sense. A RT/DL task can never inherit anything

Re: [RFC PATCH 1/6] sched/fair: check_preempt_wakeup: Fix assumption on the default policy

2016-09-20 Thread Thomas Gleixner
On Fri, 16 Sep 2016, Julien Desfossez wrote: > Tasks with RT or deadline scheduling class may inherit from a task with > a "fair" scheduling class. This makes no sense. A RT/DL task can never inherit anything from a sched fair task. That would be inverted priority inheritance. > This priority in

[RFC PATCH 1/6] sched/fair: check_preempt_wakeup: Fix assumption on the default policy

2016-09-16 Thread Julien Desfossez
Tasks with RT or deadline scheduling class may inherit from a task with a "fair" scheduling class. This priority inheritance changes the scheduling class, but not the task "policy" field. Therefore, the fair scheduler should not assume that policy != SCHED_NORMAL is the same as (policy == SCHED_BA