Re: [PATCH] sched_rt: Removes extra checking for nr_cpus_allowed whencalling find_lowest_rq

From: Rakib Mullick
Date: Tue Oct 19 2010 - 07:12:14 EST


On Tue, Oct 19, 2010 at 5:02 PM, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> On Tue, 2010-10-19 at 16:57 +0600, Rakib Mullick wrote:
>> sched_rt: Removes extra checking for nr_cpus_allowed when calling
>> find_lowest_rq
>
> Why repeat this subject?

Just trying to give a good looking format :-). Not sure whether it
really is or not.
>
>
> That's just not explaining anything.. what can go wrong, how does this
> fix it.

Actually it's not a fix. It just removes a check. It checks whether
this process is movable to other processor or not. And this check is
made from inside the find_lowest_cpu function. Thats why, the check
before calling find_lowest_cpu has been removed. Is my explanation
okay?

Thanks,
Rakib


>
>> Signed-off-by: Rakib Mullick <rakib.mullick@xxxxxxxxx>
>> ---
>>
>> --- linus-rc8/kernel/sched_rt.c       2010-10-15 05:26:43.000000000 +0600
>> +++ rakib-rc8/kernel/sched_rt.c       2010-10-19 16:22:30.000000000 +0600
>> @@ -971,8 +971,7 @@ select_task_rq_rt(struct rq *rq, struct
>>        * that is just being woken and probably will have
>>        * cold cache anyway.
>>        */
>> -     if (unlikely(rt_task(rq->curr)) &&
>> -         (p->rt.nr_cpus_allowed > 1)) {
>> +     if (unlikely(rt_task(rq->curr))) {
>>               int cpu = find_lowest_rq(p);
>>
>>               return (cpu == -1) ? task_cpu(p) : cpu;
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/