[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F85B026.2080108@gmail.com>
Date: Wed, 11 Apr 2012 18:24:06 +0200
From: Juri Lelli <juri.lelli@...il.com>
To: Steven Rostedt <rostedt@...dmis.org>
CC: peterz@...radead.org, tglx@...utronix.de, mingo@...hat.com,
oleg@...hat.com, fweisbec@...il.com, darren@...art.com,
johan.eker@...csson.com, p.faure@...tech.ch,
linux-kernel@...r.kernel.org, claudio@...dence.eu.com,
michael@...rulasolutions.com, fchecconi@...il.com,
tommaso.cucinotta@...up.it, nicola.manica@...i.unitn.it,
luca.abeni@...tn.it, dhaval.giani@...il.com, hgu1972@...il.com,
paulmck@...ux.vnet.ibm.com, raistlin@...ux.it,
insop.song@...csson.com, liming.wang@...driver.com
Subject: Re: [PATCH 06/16] sched: SCHED_DEADLINE push and pull logic
On 04/11/2012 06:21 PM, Steven Rostedt wrote:
> On Fri, 2012-04-06 at 09:14 +0200, Juri Lelli wrote:
>
>> /*
>> * Only called when both the current and waking task are -deadline
>> * tasks.
>> @@ -487,8 +819,20 @@ static void yield_task_dl(struct rq *rq)
>> static void check_preempt_curr_dl(struct rq *rq, struct task_struct *p,
>> int flags)
>> {
>> - if (dl_time_before(p->dl.deadline, rq->curr->dl.deadline))
>> + if (dl_time_before(p->dl.deadline, rq->curr->dl.deadline)) {
>> resched_task(rq->curr);
>> + return;
>> + }
>> +
>> +#ifdef CONFIG_SMP
>> + /*
>> + * In the unlikely case current and p have the same deadline
>> + * let us try to decide what's the best thing to do...
>> + */
>> + if ((s64)(p->dl.deadline - rq->curr->dl.deadline) == 0&&
>> + !need_resched())
>
> OK, maybe I'm thick. But how is:
>
> (s64)(p->dl.deadline - rq->curr->dl.deadline) == 0
>
> Better than:
>
> p->dl.deadline == rq->curr->dl.deadline
>
> ?
>
I agree, will change.
>
>> + check_preempt_equal_dl(rq, p);
>> +#endif /* CONFIG_SMP */
>> }
>>
>
>
Thanks,
- Juri
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists