All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] sched: remove duplicated init_task's preempt_notifiers init
@ 2016-08-16  9:26 seokhoon.yoon
  2016-09-05 11:55 ` [tip:sched/core] schedcore: Remove " tip-bot for seokhoon.yoon
  0 siblings, 1 reply; 2+ messages in thread
From: seokhoon.yoon @ 2016-08-16  9:26 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 related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-09-05 11:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-16  9:26 [PATCH 1/1] sched: remove duplicated init_task's preempt_notifiers init seokhoon.yoon
2016-09-05 11:55 ` [tip:sched/core] schedcore: Remove " tip-bot for seokhoon.yoon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.