[RFC] remove preempt in do_sched_yield
From: Wang You
Date: Wed Aug 23 2023 - 06:10:36 EST
I see do_sched_yield's irq disable cover preempt disable. In this
function, I think preempt op may not work, or it may have some
special effect ? Thanks.
Signed-off-by: Wang You <wangyoua@xxxxxxxxxxxxx>
---
kernel/sched/core.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index a68d1276bab0..b255e54c1d38 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -8487,10 +8487,7 @@ static void do_sched_yield(void)
schedstat_inc(rq->yld_count);
current->sched_class->yield_task(rq);
-
- preempt_disable();
rq_unlock_irq(rq, &rf);
- sched_preempt_enable_no_resched();
schedule();
}
--
2.20.1