sched/deadline: Add dl_task_is_earliest_deadline helper
authorShang XiaoJing <shangxiaojing@huawei.com>
Fri, 26 Aug 2022 08:34:53 +0000 (16:34 +0800)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 1 Sep 2022 09:19:54 +0000 (11:19 +0200)
commit973bee493a1f75c6c0752a74fb9396cbc34f026e
tree93ecd46ffe43e493a0667b26e4f4a3843da2763f
parent53aa930dc4bae6aa269951bd37103083145d6691
sched/deadline: Add dl_task_is_earliest_deadline helper

Wrap repeated code in helper function dl_task_is_earliest_deadline, which
return true if there is no deadline task on the rq at all, or task's
deadline earlier than the whole rq.

Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Daniel Bristot de Oliveira <bristot@kernel.org>
Link: https://lore.kernel.org/r/20220826083453.698-1-shangxiaojing@huawei.com
kernel/sched/deadline.c