public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "tip-bot for seokhoon.yoon" <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: peterz@infradead.org, torvalds@linux-foundation.org,
	tglx@linutronix.de, hpa@zytor.com, linux-kernel@vger.kernel.org,
	iamyooon@gmail.com, mingo@kernel.org
Subject: [tip:sched/core] schedcore: Remove duplicated init_task's preempt_notifiers init
Date: Mon, 5 Sep 2016 04:55:42 -0700	[thread overview]
Message-ID: <tip-efca03ecbe29a46c2c5ae539563b6326af9dcba7@git.kernel.org> (raw)
In-Reply-To: <1471339568-5790-1-git-send-email-iamyooon@gmail.com>

Commit-ID:  efca03ecbe29a46c2c5ae539563b6326af9dcba7
Gitweb:     http://git.kernel.org/tip/efca03ecbe29a46c2c5ae539563b6326af9dcba7
Author:     seokhoon.yoon <iamyooon@gmail.com>
AuthorDate: Tue, 16 Aug 2016 18:26:08 +0900
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 5 Sep 2016 13:29:44 +0200

schedcore: Remove duplicated init_task's preempt_notifiers init

init_task's preempt_notifiers is initialized twice:

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 the first one is unnecessary, so remove it.

Signed-off-by: seokhoon.yoon <iamyooon@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1471339568-5790-1-git-send-email-iamyooon@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 kernel/sched/core.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 7d602f5..90b1961 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -7554,10 +7554,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:
 	 */

      reply	other threads:[~2016-09-05 11:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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-bot for seokhoon.yoon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-efca03ecbe29a46c2c5ae539563b6326af9dcba7@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=hpa@zytor.com \
    --cc=iamyooon@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox