lkml.org 
[lkml]   [2011]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] sched: correct how RT task is picked
From
Date
On Wed, 2011-05-18 at 21:19 +0800, Hillf Danton wrote:

> Hi all
>
> The patch is prepared again, in which tests for both cpu and
> nr_cpus_allowed are dropped.
>
> The reason to drop nr_cpus_allowed is to make sure that the
> returned value is correct for both case that cpu == rq->cpu and
> case that cpu != rq->cpu.

-ENOPARSE

Why would we pick a task that can't migrate?

-- Steve

>
> thanks
>
> Hillf
> ---
>
> --- a/kernel/sched_rt.c 2011-04-27 11:48:50.000000000 +0800
> +++ b/kernel/sched_rt.c 2011-05-18 21:16:22.000000000 +0800
> @@ -1149,9 +1149,7 @@ static void deactivate_task(struct rq *r
>
> static int pick_rt_task(struct rq *rq, struct task_struct *p, int cpu)
> {
> - if (!task_running(rq, p) &&
> - (cpu < 0 || cpumask_test_cpu(cpu, &p->cpus_allowed)) &&
> - (p->rt.nr_cpus_allowed > 1))
> + if (!task_running(rq, p) && cpumask_test_cpu(cpu, &p->cpus_allowed))
> return 1;
> return 0;
> }




\
 
 \ /
  Last update: 2011-05-18 15:27    [W:0.075 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site