linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sched: At sched_fork use __set_task_cpu().
@ 2012-01-29 16:34 Rakib Mullick
  2012-01-31  8:48 ` Kamalesh Babulal
  0 siblings, 1 reply; 4+ messages in thread
From: Rakib Mullick @ 2012-01-29 16:34 UTC (permalink / raw)
  To: mingo, a.p.zijlstra; +Cc: linux-kernel

 We don't use select_task_rq() from sched_fork() anymore and no chance of task gets migrated at
this point. Therefore, we can avoid task migration related checking/accounting, so use
__set_task_cpu() instead of set_task_cpu().

Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
---

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index df00cb0..a38026e 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1755,7 +1755,7 @@ void sched_fork(struct task_struct *p)
 	 * Silence PROVE_RCU.
 	 */
 	raw_spin_lock_irqsave(&p->pi_lock, flags);
-	set_task_cpu(p, cpu);
+	__set_task_cpu(p, cpu);
 	raw_spin_unlock_irqrestore(&p->pi_lock, flags);
 
 #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT)



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

end of thread, other threads:[~2012-02-01 17:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-29 16:34 [PATCH] sched: At sched_fork use __set_task_cpu() Rakib Mullick
2012-01-31  8:48 ` Kamalesh Babulal
2012-02-01 13:55   ` Peter Zijlstra
2012-02-01 17:07     ` Rakib Mullick

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).