From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Roland McGrath <roland@redhat.com>,
Nick Piggin <nickpiggin@yahoo.com.au>,
Steven Rostedt <srostedt@redhat.com>
Subject: [PATCH 2/3 v2] sched: remove unlikelys from sched_move_task
Date: Wed, 25 Mar 2009 11:45:40 -0400 [thread overview]
Message-ID: <20090325154742.999233198@goodmis.org> (raw)
In-Reply-To: 20090325154538.916038098@goodmis.org
[-- Attachment #1: 0002-sched-remove-unlikelys-from-sched_move_task.patch --]
[-- Type: text/plain, Size: 1260 bytes --]
From: Steven Rostedt <rostedt@goodmis.org>
Impact: clean up
We seem to be moving running tasks more than non running tasks.
I guess tasks like to move themselves.
These are also candidates for likely:
correct incorrect % Function File Line
------- --------- - -------- ---- ----
0 10027 100 sched_move_task sched.c 8918
0 10027 100 sched_move_task sched.c 8908
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
---
kernel/sched.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/sched.c b/kernel/sched.c
index 8e2558c..5a60745 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -8905,7 +8905,7 @@ void sched_move_task(struct task_struct *tsk)
if (on_rq)
dequeue_task(rq, tsk, 0);
- if (unlikely(running))
+ if (running)
tsk->sched_class->put_prev_task(rq, tsk);
set_task_rq(tsk, task_cpu(tsk));
@@ -8915,7 +8915,7 @@ void sched_move_task(struct task_struct *tsk)
tsk->sched_class->moved_group(tsk);
#endif
- if (unlikely(running))
+ if (running)
tsk->sched_class->set_curr_task(rq);
if (on_rq)
enqueue_task(rq, tsk, 0);
--
1.6.2
--
next prev parent reply other threads:[~2009-03-25 15:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-25 15:45 [PATCH 0/3 v2] [GIT PULL] remove unlikelys Steven Rostedt
2009-03-25 15:45 ` [PATCH 1/3 v2] sched: remove unlikely in pre_schedule_rt Steven Rostedt
2009-03-25 15:45 ` Steven Rostedt [this message]
2009-03-25 15:45 ` [PATCH 3/3 v2] mm: remove unlikelys for unlock in rmap.c Steven Rostedt
2009-03-25 15:49 ` [PATCH 0/3 v2] [GIT PULL] remove unlikelys Steven Rostedt
2009-03-25 16:19 ` Ingo Molnar
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=20090325154742.999233198@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=nickpiggin@yahoo.com.au \
--cc=peterz@infradead.org \
--cc=roland@redhat.com \
--cc=srostedt@redhat.com \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox