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 21:39 +0800, Hillf Danton wrote:

> > +static void inc_dl_migration(struct sched_dl_entity *dl_se, struct dl_rq *dl_rq)
> > +{
> > + dl_rq = &rq_of_dl_rq(dl_rq)->dl;
> > +
> > + dl_rq->dl_nr_total++;
> > + if (dl_se->nr_cpus_allowed > 1)
> > + dl_rq->dl_nr_migratory++;
> > +
> > + update_dl_migration(dl_rq);
>
> if (dl_se->nr_cpus_allowed > 1) {
> dl_rq->dl_nr_migratory++;
> /* No change in migratory, no update of migration */

This is not true. As dl_nr_total changed. If there was only one dl task
queued that can migrate, and then another dl task is queued but this
task can not migrate, the update_dl_migration still needs to be called.
As dl_nr_migratory would be 1, but now dl_nr_total > 1. This means we
are now overloaded.

> update_dl_migration(dl_rq);
> }
>
> > +}
> > +
> > +static void dec_dl_migration(struct sched_dl_entity *dl_se, struct dl_rq *dl_rq)
> > +{
> > + dl_rq = &rq_of_dl_rq(dl_rq)->dl;
> > +
> > + dl_rq->dl_nr_total--;
> > + if (dl_se->nr_cpus_allowed > 1)
> > + dl_rq->dl_nr_migratory--;
> > +
> > + update_dl_migration(dl_rq);
>
> ditto

ditto.

>
> > +}
> > +
> > +/*
> > + * The list of pushable -deadline task is not a plist, like in
> > + * sched_rt.c, it is an rb-tree with tasks ordered by deadline.

-- Steve




\
 
 \ /
  Last update: 2012-04-11 16:13    [W:0.278 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site