Re: [PATCH v3 2/2] sched/rt: Add check_preempt_equal_prio() logic in pick_next_task_rt()
From: Steven Rostedt
Date: Sat Feb 14 2015 - 23:23:25 EST
On Sun, 15 Feb 2015 10:54:25 +0800
pang.xunlei@xxxxxxxxxx wrote:
> I think this can also happen for check_preempt_equal_prio():
> When RT1(current task) gets preempted by RT2, if there is a
> migratable RT3 with same prio, RT3 will be pushed away instead
> of RT1 afterwards, because RT1 will be enqueued to the tail of
> the pushable list via succeeding put_prev_task_rt() triggered
> by resched.
>
> There seems some trouble involved in rt equal prio cases.
Hmm, you may be right, and that should be fixed. If a task is running
and gets preempted by a higher priority task (or even of same priority
for migrating), then it should stay at the front of the queue to be
migrated. It should only be placed after other FIFO tasks of the same
priority if that task calls schedule() directly (not preempted).
SMP always cracks a few rotten eggs in the RT omelet.
-- Steve
--
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/