public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sched/core: return prio_less() directly in __sched_core_less
@ 2021-08-24 10:19 Li RongQing
  2021-09-27 13:08 ` 答复: " Li,Rongqing
  2021-10-22  4:17 ` Li,Rongqing
  0 siblings, 2 replies; 3+ messages in thread
From: Li RongQing @ 2021-08-24 10:19 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, vincent.guittot, linux-kernel,
	lirongqing

return prio_less() directly to avoid unnecessary checking

Signed-off-by: Li RongQing <lirongqing@baidu.com>
---
 kernel/sched/core.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 2d9ff40..73478c9 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -140,10 +140,7 @@ static inline bool __sched_core_less(struct task_struct *a, struct task_struct *
 		return false;
 
 	/* flip prio, so high prio is leftmost */
-	if (prio_less(b, a, task_rq(a)->core->core_forceidle))
-		return true;
-
-	return false;
+	return prio_less(b, a, task_rq(a)->core->core_forceidle);
 }
 
 #define __node_2_sc(node) rb_entry((node), struct task_struct, core_node)
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-22  4:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-24 10:19 [PATCH] sched/core: return prio_less() directly in __sched_core_less Li RongQing
2021-09-27 13:08 ` 答复: " Li,Rongqing
2021-10-22  4:17 ` Li,Rongqing

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox