lkml.org 
[lkml]   [2012]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] sched: At sched_fork use __set_task_cpu().
* Rakib Mullick <rakib.mullick@gmail.com> [2012-01-29 22:34:37]:

> 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>
Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.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)
>
>
> --



\
 
 \ /
  Last update: 2012-01-31 09:51    [W:0.124 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site