From: Rakib Mullick <rakib.mullick@gmail.com>
To: mingo@elte.hu, a.p.zijlstra@chello.nl
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] sched: At sched_fork use __set_task_cpu().
Date: Sun, 29 Jan 2012 22:34:37 +0600 [thread overview]
Message-ID: <1327854877.8504.3.camel@localhost.localdomain> (raw)
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)
next reply other threads:[~2012-01-29 16:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-29 16:34 Rakib Mullick [this message]
2012-01-31 8:48 ` [PATCH] sched: At sched_fork use __set_task_cpu() Kamalesh Babulal
2012-02-01 13:55 ` Peter Zijlstra
2012-02-01 17:07 ` Rakib Mullick
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1327854877.8504.3.camel@localhost.localdomain \
--to=rakib.mullick@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.