Messages in this thread | | | Subject | Re: [PATCH] sched: correct how RT task is picked | From | Steven Rostedt <> | Date | Wed, 18 May 2011 09:24:04 -0400 |
| |
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; > }
| |