* [RESEND PATCH 1/1] sched: remove duplicated init_task's preempt_notifiers init
@ 2016-08-25 13:22 seokhoon.yoon
0 siblings, 0 replies; only message in thread
From: seokhoon.yoon @ 2016-08-25 13:22 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Peter Zijlstra, iamyooon, linux-kernel
init_task's preempt_notifiers is initialized at two times.
1) sched_init()
-> INIT_HLIST_HEAD(&init_task.preempt_notifiers)
2) sched_init()
-> init_idle(current,) <--- current task is init_task at this time
-> __sched_fork(,current)
-> INIT_HLIST_HEAD(&p->preempt_notifiers)
I think first one is needless, remove it.
Signed-off-by: seokhoon.yoon <iamyooon@gmail.com>
---
kernel/sched/core.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 5c883fe..5760f62 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -7482,10 +7482,6 @@ void __init sched_init(void)
set_load_weight(&init_task);
-#ifdef CONFIG_PREEMPT_NOTIFIERS
- INIT_HLIST_HEAD(&init_task.preempt_notifiers);
-#endif
-
/*
* The boot idle thread does lazy MMU switching as well:
*/
--
1.9.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-08-25 13:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-25 13:22 [RESEND PATCH 1/1] sched: remove duplicated init_task's preempt_notifiers init seokhoon.yoon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome