lkml.org 
[lkml]   [2012]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 06/16] sched: SCHED_DEADLINE push and pull logic
    From
    Date
    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

    ?

    -- Steve

    > + check_preempt_equal_dl(rq, p);
    > +#endif /* CONFIG_SMP */
    > }
    >




    \
     
     \ /
      Last update: 2012-04-11 18:23    [W:0.025 / U:0.060 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site