Skip to contentSkip to conversation

sched: rewrite the wrong annotation for select_task_rq_fair()

PATCH Michael Wang 1 participant 4 messages Sep 26, 2012 – Oct 9, 2012 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 4 lines · Michael Wang

The annotation for select_task_rq_fair() is wrong since commit c88d5910, it's actually for a removed function.

This patch rewrite the wrong annotation to make it correct.

Could I get some comments on this patch?

Regards,
Michael Wang

Quoted 35 lines
---
 kernel/sched/fair.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
kernel/sched/fair.c +8 -6
index 6b800a1..35eb43a 100644
@@ -2682,15 +2682,17 @@ done:
 }
 
 /*
- * sched_balance_self: 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.
+ * select_task_rq_fair:
+ *	Select a suitable CPU for task p, in order to keep load balance.
  *
- * Balance, ie. select the least loaded group.
+ *	sd_flag:
+ *		the domain we try to balance should have "sd_flag" flag set.
  *
- * Returns the target CPU number, or the same CPU if no balancing is needed.
+ *	wake_flags:
+ *		indicate WF_SYNC.
  *
- * preempt must be disabled.
+ *	Must hold p->pi_lock and disable irq before invoke.
+ *	Return the CPU number for task p to running on.
  */
 static int
 select_task_rq_fair(struct task_struct *p, int sd_flag, int wake_flags)
#2 lore raw
Quoted 7 lines · Michael Wang
Quoted 4 lines · Michael Wang

The annotation for select_task_rq_fair() is wrong since commit c88d5910, it's actually for a removed function.

This patch rewrite the wrong annotation to make it correct.

Could I get some comments on this patch?

Hmm...no comments for a month...is that because there some wrong understanding while explain the function or I didn't follow the rule?

Please let me know if I have made any mistake so I could do better in future ;-)

Regards,
Michael Wang

Quoted 40 lines

Regards,
Michael Wang

Quoted 35 lines
---
 kernel/sched/fair.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
kernel/sched/fair.c +8 -6
index 6b800a1..35eb43a 100644
@@ -2682,15 +2682,17 @@ done:
 }
 
 /*
- * sched_balance_self: 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.
+ * select_task_rq_fair:
+ *	Select a suitable CPU for task p, in order to keep load balance.
  *
- * Balance, ie. select the least loaded group.
+ *	sd_flag:
+ *		the domain we try to balance should have "sd_flag" flag set.
  *
- * Returns the target CPU number, or the same CPU if no balancing is needed.
+ *	wake_flags:
+ *		indicate WF_SYNC.
  *
- * preempt must be disabled.
+ *	Must hold p->pi_lock and disable irq before invoke.
+ *	Return the CPU number for task p to running on.
  */
 static int
 select_task_rq_fair(struct task_struct *p, int sd_flag, int wake_flags)
#3 lore raw
Quoted 7 lines · Michael Wang
Quoted 6 lines · Michael Wang
Quoted 4 lines · Michael Wang

The annotation for select_task_rq_fair() is wrong since commit c88d5910, it's actually for a removed function.

This patch rewrite the wrong annotation to make it correct.

Quoted 7 lines
Quoted 1 line

Could I get some comments on this patch?

Hmm...no comments for a month...is that because there some wrong understanding while explain the function or I didn't follow the rule?

Please let me know if I have made any mistake so I could do better in future ;-)

Oh, I just notice Peter is on CC list not the destination...My fault again...

Regards,
Michael Wang

Quoted 45 lines

Regards,
Michael Wang

Quoted 40 lines

Regards,
Michael Wang

Quoted 35 lines
---
 kernel/sched/fair.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
kernel/sched/fair.c +8 -6
index 6b800a1..35eb43a 100644
@@ -2682,15 +2682,17 @@ done:
 }
 
 /*
- * sched_balance_self: 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.
+ * select_task_rq_fair:
+ *	Select a suitable CPU for task p, in order to keep load balance.
  *
- * Balance, ie. select the least loaded group.
+ *	sd_flag:
+ *		the domain we try to balance should have "sd_flag" flag set.
  *
- * Returns the target CPU number, or the same CPU if no balancing is needed.
+ *	wake_flags:
+ *		indicate WF_SYNC.
  *
- * preempt must be disabled.
+ *	Must hold p->pi_lock and disable irq before invoke.
+ *	Return the CPU number for task p to running on.
  */
 static int
 select_task_rq_fair(struct task_struct *p, int sd_flag, int wake_flags)
#4 lore raw
In reply to a message not in the archive
Quoted 4 lines · Michael Wang

The annotation for select_task_rq_fair() is wrong since commit c88d5910, it's actually for a removed function.

This patch rewrite the wrong annotation to make it correct.

Could I get some comments on the patch?

Regards,
Michael Wang

Quoted 35 lines
---
 kernel/sched/fair.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
kernel/sched/fair.c +8 -6
index 6b800a1..35eb43a 100644
@@ -2682,15 +2682,17 @@ done:
 }
 
 /*
- * sched_balance_self: 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.
+ * select_task_rq_fair:
+ *	Select a suitable CPU for task p, in order to keep load balance.
  *
- * Balance, ie. select the least loaded group.
+ *	sd_flag:
+ *		the domain we try to balance should have "sd_flag" flag set.
  *
- * Returns the target CPU number, or the same CPU if no balancing is needed.
+ *	wake_flags:
+ *		indicate WF_SYNC.
  *
- * preempt must be disabled.
+ *	Must hold p->pi_lock and disable irq before invoke.
+ *	Return the CPU number for task p to running on.
  */
 static int
 select_task_rq_fair(struct task_struct *p, int sd_flag, int wake_flags)