Re: [PATCH 06/16] sched: SCHED_DEADLINE push and pull logic

From: Hillf Danton
Date: Thu Apr 12 2012 - 08:28:53 EST


On Wed, Apr 11, 2012 at 10:10 PM, Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
> 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.
>
if (2 == dl_nr_migratory + dl_nr_total)
rq was not overloaded;

after enqueuing a deadline task that is not migratory,

if (current task is not preempted)
rq remains not overloaded;

else if (current task is not pushed out) {
if (rq is not overloaded)
maintenance of overloaded is __corrupted__;
}

btw, same behavior in RTS?
--
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/