===================================================================
@@ -1308,7 +1308,7 @@ static inline bool blk_needs_flush_plug(
{
struct blk_plug *plug = tsk->plug;
- return plug &&
+ return unlikely(plug != NULL) &&
(!list_empty(&plug->list) ||
!list_empty(&plug->mq_list) ||
!list_empty(&plug->cb_list));
===================================================================
@@ -3405,7 +3405,7 @@ void __noreturn do_task_dead(void)
static inline void sched_submit_work(struct task_struct *tsk)
{
- if (!tsk->state || tsk_is_pi_blocked(tsk))
+ if (!tsk->state || unlikely(tsk_is_pi_blocked(tsk)))
return;
/*
* If we are going to sleep and we have plugged IO queued,