Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1463586 > unrolled thread

[PATCH 1/1] sched: remove duplicated init_task's preempt_notifiers init

Started by"seokhoon.yoon" <iamyooon@gmail.com>
First post2016-08-16 11:30 +0200
Last post2016-08-16 11:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/1] sched: remove duplicated init_task's preempt_notifiers init "seokhoon.yoon" <iamyooon@gmail.com> - 2016-08-16 11:30 +0200

#1463586 — [PATCH 1/1] sched: remove duplicated init_task's preempt_notifiers init

From"seokhoon.yoon" <iamyooon@gmail.com>
Date2016-08-16 11:30 +0200
Subject[PATCH 1/1] sched: remove duplicated init_task's preempt_notifiers init
Message-ID<s6IR4-1hW-11@gated-at.bofh.it>
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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web