linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sched/core: emove unnecessary initialization in sched_init()
@ 2016-09-14  2:18 Cheng Chao
  2016-09-14  2:23 ` [PATCH v2] sched/core: remove " Cheng Chao
  2016-09-22 13:58 ` [tip:sched/core] sched/core: Remove " tip-bot for Cheng Chao
  0 siblings, 2 replies; 4+ messages in thread
From: Cheng Chao @ 2016-09-14  2:18 UTC (permalink / raw)
  To: mingo, peterz; +Cc: linux-kernel, Cheng Chao, stable

init_idle() is called immediately after current->sched_class
= &fair_sched_class, init_idle() sets current->sched_class
= &idle_sched_class.

Signed-off-by: Cheng Chao <cs.os.kernel@gmail.com>
Cc: stable@vger.kernel.org
---
 kernel/sched/core.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index a0086a5..ed4f4fe 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -7557,11 +7557,6 @@ void __init sched_init(void)
 	enter_lazy_tlb(&init_mm, current);
 
 	/*
-	 * During early bootup we pretend to be a normal task:
-	 */
-	current->sched_class = &fair_sched_class;
-
-	/*
 	 * Make us the idle thread. Technically, schedule() should not be
 	 * called from this thread, however somewhere below it might be,
 	 * but because we are the idle thread, we just pick up running again
-- 
2.4.11

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v2] sched/core: remove unnecessary initialization in sched_init()
  2016-09-14  2:18 [PATCH] sched/core: emove unnecessary initialization in sched_init() Cheng Chao
@ 2016-09-14  2:23 ` Cheng Chao
  2016-09-18  1:59   ` Cheng Chao
  2016-09-22 13:58 ` [tip:sched/core] sched/core: Remove " tip-bot for Cheng Chao
  1 sibling, 1 reply; 4+ messages in thread
From: Cheng Chao @ 2016-09-14  2:23 UTC (permalink / raw)
  To: mingo, peterz; +Cc: linux-kernel, Cheng Chao, stable

init_idle() is called immediately after current->sched_class
= &fair_sched_class, init_idle() sets current->sched_class
= &idle_sched_class.

Signed-off-by: Cheng Chao <cs.os.kernel@gmail.com>
Cc: stable@vger.kernel.org
---
 kernel/sched/core.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index a0086a5..ed4f4fe 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -7557,11 +7557,6 @@ void __init sched_init(void)
 	enter_lazy_tlb(&init_mm, current);
 
 	/*
-	 * During early bootup we pretend to be a normal task:
-	 */
-	current->sched_class = &fair_sched_class;
-
-	/*
 	 * Make us the idle thread. Technically, schedule() should not be
 	 * called from this thread, however somewhere below it might be,
 	 * but because we are the idle thread, we just pick up running again
-- 
2.4.11

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] sched/core: remove unnecessary initialization in sched_init()
  2016-09-14  2:23 ` [PATCH v2] sched/core: remove " Cheng Chao
@ 2016-09-18  1:59   ` Cheng Chao
  0 siblings, 0 replies; 4+ messages in thread
From: Cheng Chao @ 2016-09-18  1:59 UTC (permalink / raw)
  To: peterz; +Cc: mingo, linux-kernel, stable

Hi Peter,

  Would you please review this patch? thanks.

Cheng

on 09/14/2016 10:23 AM, Cheng Chao wrote:
> init_idle() is called immediately after current->sched_class
> = &fair_sched_class, init_idle() sets current->sched_class
> = &idle_sched_class.
> 
> Signed-off-by: Cheng Chao <cs.os.kernel@gmail.com>
> Cc: stable@vger.kernel.org
> ---
>  kernel/sched/core.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index a0086a5..ed4f4fe 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -7557,11 +7557,6 @@ void __init sched_init(void)
>  	enter_lazy_tlb(&init_mm, current);
>  
>  	/*
> -	 * During early bootup we pretend to be a normal task:
> -	 */
> -	current->sched_class = &fair_sched_class;
> -
> -	/*
>  	 * Make us the idle thread. Technically, schedule() should not be
>  	 * called from this thread, however somewhere below it might be,
>  	 * but because we are the idle thread, we just pick up running again
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [tip:sched/core] sched/core: Remove unnecessary initialization in sched_init()
  2016-09-14  2:18 [PATCH] sched/core: emove unnecessary initialization in sched_init() Cheng Chao
  2016-09-14  2:23 ` [PATCH v2] sched/core: remove " Cheng Chao
@ 2016-09-22 13:58 ` tip-bot for Cheng Chao
  1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for Cheng Chao @ 2016-09-22 13:58 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: tglx, cs.os.kernel, mingo, peterz, hpa, torvalds, linux-kernel

Commit-ID:  0b8473570ce1af3e80da05b59f9321f30253de4d
Gitweb:     http://git.kernel.org/tip/0b8473570ce1af3e80da05b59f9321f30253de4d
Author:     Cheng Chao <cs.os.kernel@gmail.com>
AuthorDate: Wed, 14 Sep 2016 10:18:56 +0800
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 22 Sep 2016 14:53:44 +0200

sched/core: Remove unnecessary initialization in sched_init()

init_idle() is called immediately after:

  current->sched_class = &fair_sched_class;

init_idle() sets:

  current->sched_class = &idle_sched_class;

First assignment is superfluous.

Signed-off-by: Cheng Chao <cs.os.kernel@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/1473819536-7398-1-git-send-email-cs.os.kernel@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 kernel/sched/core.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 860070f..c5f020c 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -7558,11 +7558,6 @@ void __init sched_init(void)
 	enter_lazy_tlb(&init_mm, current);
 
 	/*
-	 * During early bootup we pretend to be a normal task:
-	 */
-	current->sched_class = &fair_sched_class;
-
-	/*
 	 * Make us the idle thread. Technically, schedule() should not be
 	 * called from this thread, however somewhere below it might be,
 	 * but because we are the idle thread, we just pick up running again

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-09-22 13:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-14  2:18 [PATCH] sched/core: emove unnecessary initialization in sched_init() Cheng Chao
2016-09-14  2:23 ` [PATCH v2] sched/core: remove " Cheng Chao
2016-09-18  1:59   ` Cheng Chao
2016-09-22 13:58 ` [tip:sched/core] sched/core: Remove " tip-bot for Cheng Chao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).