Re: [PATCH]sched/rt: Do not try to push tasks if pinned task switches to RT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 12 Mar 2014, Steven Rostedt wrote:

> Peter,
> 
> I'm going through my inbox (over a year old), and found this patch from
> Kirill. It looks fine to me. You can apply it with my
> 
>   Acked-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
>
> -- Steve
> 
> [PATCH]sched/rt: Do not try to push tasks if pinned task switches to RT
> 
> Just switched pinned task is not able to be pushed. If the rq had had
> several RT tasks before they have already been considered as candidates
> to be pushed (or pulled).
> 
> Signed-off-by: Kirill V Tkhai <tkhai@xxxxxxxxx>
> CC: Steven Rostedt <rostedt@xxxxxxxxxxx>
> CC: Ingo Molnar <mingo@xxxxxxxxxx>
> CC: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> CC: linux-rt-users <linux-rt-users@xxxxxxxxxxxxxxx>
> ---
>  kernel/sched/rt.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
> index 4e8f0f4..5aab032 100644
> --- a/kernel/sched/rt.c
> +++ b/kernel/sched/rt.c
> @@ -1925,9 +1925,9 @@ static void switched_to_rt(struct rq *rq, struct task_struct *p)
>  	 */
>  	if (p->on_rq && rq->curr != p) {
>  #ifdef CONFIG_SMP
> -		if (rq->rt.overloaded && push_rt_task(rq) &&
> +		if (p->nr_cpus_allowed > 1 && rq->rt.overloaded &&
>  		    /* Don't resched if we changed runqueues */
> -		    rq != task_rq(p))
> +		    push_rt_task(rq) && rq != task_rq(p))
>  			check_resched = 0;
>  #endif /* CONFIG_SMP */
>  		if (check_resched && p->prio < rq->curr->prio)

would there not need to be a check for p->migrate_disable ?
push_rt_task() is not checking and so a high prio RT task 
preemting a low prio RT task in a migrate_disable() section
would actually push it off this cpu ? atleast I did not 
find why that would not happen.

thx!
hofrat
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux