Skip to contentSkip to conversation

Sched: Some trivial typo fixes

PATCH In review Zhi Yong Wu 2 participants 10 messages Dec 27, 2013 – Dec 28, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Sched: Some trivial typo fixes

From: Zhi Yong Wu <[email protected]>

*** BLURB HERE ***

Zhi Yong Wu (5):
sched, rt: move .switched_from out of the scope of CONFIG_SMP sched, fair: fix the comment of move_tasks()
sched, fair: fix the typo in select_idle_sibling() sched, fair: fix the comment of select_task_rq_fair() Documentation, sched-arch.txt: fix the incorrect syntax

 Documentation/scheduler/sched-arch.txt |    2 +-
 kernel/sched/fair.c                    |    6 +++---
 kernel/sched/rt.c                      |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
Signature · 1 line
1.7.6.5
#1 lore raw

PATCH 1/5 sched, rt: move .switched_from out of the scope of CONFIG_SMP

From: Zhi Yong Wu <[email protected]>

.switched_from shouldn't be initialized in the scope of CONFIG_SMP, so this patch is trying to move it out.

---
 kernel/sched/rt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/sched/rt.c +1 -1
index 1c40655..f34d41b 100644
@@ -2002,9 +2002,9 @@ const struct sched_class rt_sched_class = {
 	.pre_schedule		= pre_schedule_rt,
 	.post_schedule		= post_schedule_rt,
 	.task_woken		= task_woken_rt,
-	.switched_from		= switched_from_rt,
 #endif
 
+	.switched_from		= switched_from_rt,
 	.set_curr_task          = set_curr_task_rt,
 	.task_tick		= task_tick_rt,
 
Signature · 1 line
1.7.6.5
#2 lore raw

Re: [PATCH 1/5] sched, rt: move .switched_from out of the scope of CONFIG_SMP

Quoted 15 lines · Zhi Yong Wu

From: Zhi Yong Wu <[email protected]>

.switched_from shouldn't be initialized in the scope of CONFIG_SMP, so this patch is trying to move it out.

---
 kernel/sched/rt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/sched/rt.c +0 -0
index 1c40655..f34d41b 100644

kernel/sched/rt.c const struct sched_class rt_sched_class = { · line 2009

Quoted 9 lines
kernel/sched/rt.c +1 -1
@@ -2002,9 +2002,9 @@ const struct sched_class rt_sched_class = {
 	.pre_schedule		= pre_schedule_rt,
 	.post_schedule		= post_schedule_rt,
 	.task_woken		= task_woken_rt,
-	.switched_from		= switched_from_rt,
 #endif
 
+	.switched_from		= switched_from_rt,
 	.set_curr_task          = set_curr_task_rt,
 	.task_tick		= task_tick_rt,

This will not be compilable in !SMP mode because the body of switched_from_rt() is still under CONFIG_SMP define.

Kirill

#3 lore raw

Re: [PATCH 1/5] sched, rt: move .switched_from out of the scope of CONFIG_SMP

Quoted 22 lines · Kirill Tkhai
Quoted 21 lines · Zhi Yong Wu

From: Zhi Yong Wu <[email protected]>

.switched_from shouldn't be initialized in the scope of CONFIG_SMP, so this patch is trying to move it out.

---
 kernel/sched/rt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/sched/rt.c +0 -1
index 1c40655..f34d41b 100644
@@ -2002,9 +2002,9 @@ const struct sched_class rt_sched_class = {
      .pre_schedule           = pre_schedule_rt,
      .post_schedule          = post_schedule_rt,
      .task_woken             = task_woken_rt,
-     .switched_from          = switched_from_rt,
 #endif
 
Quoted 6 lines

kernel/sched/rt.c const struct sched_class rt_sched_class = { · line 2009

Quoted 3 lines
kernel/sched/rt.c +1 -0
+     .switched_from          = switched_from_rt,
      .set_curr_task          = set_curr_task_rt,
      .task_tick              = task_tick_rt,

This will not be compilable in !SMP mode because the body of switched_from_rt() is still under CONFIG_SMP define.

How about also removing its body out?

Quoted 2 lines

Kirill

Signature · 3 lines
Regards,

Zhi Yong Wu
#4 lore raw

Re: [PATCH 1/5] sched, rt: move .switched_from out of the scope of CONFIG_SMP

Quoted 23 lines · Zhi Yong Wu
Quoted 22 lines · Kirill Tkhai
Quoted 21 lines · Zhi Yong Wu

From: Zhi Yong Wu <[email protected]>

.switched_from shouldn't be initialized in the scope of CONFIG_SMP, so this patch is trying to move it out.

---
 kernel/sched/rt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/sched/rt.c +0 -1
index 1c40655..f34d41b 100644
@@ -2002,9 +2002,9 @@ const struct sched_class rt_sched_class = {
      .pre_schedule           = pre_schedule_rt,
      .post_schedule          = post_schedule_rt,
      .task_woken             = task_woken_rt,
-     .switched_from          = switched_from_rt,
 #endif
 
Quoted 7 lines
Quoted 6 lines

kernel/sched/rt.c const struct sched_class rt_sched_class = { · line 2009

Quoted 3 lines
kernel/sched/rt.c +1 -0
+     .switched_from          = switched_from_rt,
      .set_curr_task          = set_curr_task_rt,
      .task_tick              = task_tick_rt,

This will not be compilable in !SMP mode because the body of switched_from_rt() is still under CONFIG_SMP define.

How about also removing its body out?

switched_from_rt() is necessary only in SMP mode, so I think we should not change anything connected with it here. It's already initialized properly.

Quoted 9 lines
Quoted 2 lines

Kirill

Signature · 3 lines
Regards,

Zhi Yong Wu
#5 lore raw

Re: [PATCH 1/5] sched, rt: move .switched_from out of the scope of CONFIG_SMP

Quoted 30 lines · Kirill Tkhai
Quoted 29 lines · Zhi Yong Wu
Quoted 28 lines · Kirill Tkhai
Quoted 15 lines · Zhi Yong Wu

From: Zhi Yong Wu <[email protected]>

.switched_from shouldn't be initialized in the scope of CONFIG_SMP, so this patch is trying to move it out.

---
 kernel/sched/rt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/sched/rt.c +0 -0
index 1c40655..f34d41b 100644

kernel/sched/rt.c const struct sched_class rt_sched_class = { · line 2009

Quoted 9 lines
kernel/sched/rt.c +1 -1
@@ -2002,9 +2002,9 @@ const struct sched_class rt_sched_class = {
      .pre_schedule           = pre_schedule_rt,
      .post_schedule          = post_schedule_rt,
      .task_woken             = task_woken_rt,
-     .switched_from          = switched_from_rt,
 #endif
 
+     .switched_from          = switched_from_rt,
      .set_curr_task          = set_curr_task_rt,
      .task_tick              = task_tick_rt,

This will not be compilable in !SMP mode because the body of switched_from_rt() is still under CONFIG_SMP define.

Quoted 5 lines
Quoted 1 line

How about also removing its body out?

switched_from_rt() is necessary only in SMP mode, so I think we should not change anything connected with it here. It's already initialized properly.

pls ignore this patch, thanks.

Quoted 10 lines
Quoted 10 lines
Quoted 3 lines

Kirill

--
Regards,

Zhi Yong Wu

Signature · 3 lines
Regards,

Zhi Yong Wu
#6 lore raw

PATCH 2/5 sched, fair: fix the comment of move_tasks()

In reply to Zhi Yong Wu

From: Zhi Yong Wu <[email protected]>

---
 kernel/sched/fair.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/sched/fair.c +1 -1
index c7395d9..a82ae0a 100644
@@ -4982,7 +4982,7 @@ static const unsigned int sched_nr_migrate_break = 32;
 /*
  * move_tasks tries to move up to imbalance weighted load from busiest to
  * this_rq, as part of a balancing operation within domain "sd".
- * Returns 1 if successful and 0 otherwise.
+ * Returns the number of moved tasks if successful and 0 otherwise.
  *
  * Called with both runqueues locked.
  */
Signature · 1 line
1.7.6.5
#7 lore raw

PATCH 3/5 sched, fair: fix the typo in select_idle_sibling()

In reply to Zhi Yong Wu

From: Zhi Yong Wu <[email protected]>

---
 kernel/sched/fair.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/sched/fair.c +1 -1
index a82ae0a..db23d71 100644
@@ -4191,7 +4191,7 @@ static int select_idle_sibling(struct task_struct *p, int target)
 		return i;
 
 	/*
-	 * Otherwise, iterate the domains and find an elegible idle cpu.
+	 * Otherwise, iterate the domains and find an eligible idle cpu.
 	 */
 	sd = rcu_dereference(per_cpu(sd_llc, target));
 	for_each_lower_domain(sd) {
Signature · 1 line
1.7.6.5
#8 lore raw

PATCH 4/5 sched, fair: fix the comment of select_task_rq_fair()

In reply to Zhi Yong Wu

From: Zhi Yong Wu <[email protected]>

---
 kernel/sched/fair.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/sched/fair.c +1 -1
index db23d71..eaa1e91 100644
@@ -4218,7 +4218,7 @@ done:
 }
 
 /*
- * sched_balance_self: balance the current task (running on cpu) in domains
+ * select_task_rq_fair: balance the current task (running on cpu) in domains
  * that have the 'flag' flag set. In practice, this is SD_BALANCE_FORK and
  * SD_BALANCE_EXEC.
  *
Signature · 1 line
1.7.6.5
#9 lore raw

PATCH 5/5 Documentation, sched-arch.txt: fix the incorrect syntax

In reply to Zhi Yong Wu

From: Zhi Yong Wu <[email protected]>

---
 Documentation/scheduler/sched-arch.txt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Documentation/scheduler/sched-arch.txt +1 -1
index 9290de7..0a7d252 100644
@@ -21,7 +21,7 @@ CPU idle
 ========
 Your cpu_idle routines need to obey the following rules:
 
-1. Preempt should now disabled over idle routines. Should only
+1. Preempt should be now disabled over idle routines. Should only
    be enabled to call schedule() then disabled again.
 
 2. need_resched/TIF_NEED_RESCHED is only ever set, and will never
Signature · 1 line
1.7.6.5