linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL] sched: Remove unlikely likelys (take two)
@ 2011-06-02 18:48 Steven Rostedt
  2011-06-03 15:05 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Steven Rostedt @ 2011-06-02 18:48 UTC (permalink / raw)
  To: LKML
  Cc: Ingo Molnar, Peter Zijlstra, Gregory Haskins, Rusty Russell, Yong Zhang

Hi Ingo,

I noticed this pull request never made it into tip:

 https://lkml.org/lkml/2010/12/13/625

I tested it again by merging it into latest Linus's tree and running a
bunch of tests on it. The tests show that it still works (besides the
bugs it finds from the normal 3.0-rc release).

Please pull the latest unlikely/sched tree, which can be found at:

  git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
unlikely/sched


Steven Rostedt (3):
      sched: Change pick_next_task_rt from unlikely to likely
      sched: Remove unlikely() from rt_policy() in sched.c
      sched: Remove unlikely() from ttwu_post_activation

Yong Zhang (1):
      sched: Cleanup pre_schedule_rt

----
 kernel/sched.c    |    4 ++--
 kernel/sched_rt.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index dc91a4d..6d24b2e 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -123,7 +123,7 @@
 
 static inline int rt_policy(int policy)
 {
-	if (unlikely(policy == SCHED_FIFO || policy == SCHED_RR))
+	if (policy == SCHED_FIFO || policy == SCHED_RR)
 		return 1;
 	return 0;
 }
@@ -2458,7 +2458,7 @@ static inline void ttwu_post_activation(struct task_struct *p, struct rq *rq,
 	if (p->sched_class->task_woken)
 		p->sched_class->task_woken(rq, p);
 
-	if (unlikely(rq->idle_stamp)) {
+	if (rq->idle_stamp) {
 		u64 delta = rq->clock - rq->idle_stamp;
 		u64 max = 2*sysctl_sched_migration_cost;
 
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
index bea7d79..c2266c4 100644
--- a/kernel/sched_rt.c
+++ b/kernel/sched_rt.c
@@ -1062,7 +1062,7 @@ static struct task_struct *_pick_next_task_rt(struct rq *rq)
 
 	rt_rq = &rq->rt;
 
-	if (unlikely(!rt_rq->rt_nr_running))
+	if (!rt_rq->rt_nr_running)
 		return NULL;
 
 	if (rt_rq_throttled(rt_rq))
@@ -1474,7 +1474,7 @@ skip:
 static void pre_schedule_rt(struct rq *rq, struct task_struct *prev)
 {
 	/* Try to pull RT tasks here if we lower this rq's prio */
-	if (unlikely(rt_task(prev)) && rq->rt.highest_prio.curr > prev->prio)
+	if (rq->rt.highest_prio.curr > prev->prio)
 		pull_rt_task(rq);
 }
 



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

* Re: [GIT PULL] sched: Remove unlikely likelys (take two)
  2011-06-02 18:48 [GIT PULL] sched: Remove unlikely likelys (take two) Steven Rostedt
@ 2011-06-03 15:05 ` Ingo Molnar
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2011-06-03 15:05 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: LKML, Peter Zijlstra, Gregory Haskins, Rusty Russell, Yong Zhang


* Steven Rostedt <rostedt@goodmis.org> wrote:

> Hi Ingo,
> 
> I noticed this pull request never made it into tip:
> 
>  https://lkml.org/lkml/2010/12/13/625
> 
> I tested it again by merging it into latest Linus's tree and running a
> bunch of tests on it. The tests show that it still works (besides the
> bugs it finds from the normal 3.0-rc release).
> 
> Please pull the latest unlikely/sched tree, which can be found at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
> unlikely/sched
> 
> 
> Steven Rostedt (3):
>       sched: Change pick_next_task_rt from unlikely to likely
>       sched: Remove unlikely() from rt_policy() in sched.c
>       sched: Remove unlikely() from ttwu_post_activation
> 
> Yong Zhang (1):
>       sched: Cleanup pre_schedule_rt
> 
> ----
>  kernel/sched.c    |    4 ++--
>  kernel/sched_rt.c |    4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)

Pulled, thanks a lot Steve!

	Ingo

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

end of thread, other threads:[~2011-06-03 15:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-02 18:48 [GIT PULL] sched: Remove unlikely likelys (take two) Steven Rostedt
2011-06-03 15:05 ` Ingo Molnar

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