lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.0903250124080.5675@gandalf.stny.rr.com>
Date:	Wed, 25 Mar 2009 01:24:47 -0400 (EDT)
From:	Steven Rostedt <rostedt@...dmis.org>
To:	linux-kernel@...r.kernel.org
cc:	Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Peter Zijlstra <peterz@...radead.org>,
	Roland McGrath <roland@...hat.com>,
	Nick Piggin <nickpiggin@...oo.com.au>,
	Steven Rostedt <srostedt@...hat.com>
Subject: Re: [PATCH 3/5] sched: remove unlikely in pre_schedule_rt



On Wed, 25 Mar 2009, Steven Rostedt wrote:

> From: Steven Rostedt <rostedt@...dmis.org>
> 
> Impact: clean up
> 
> The annotated branch profiler shows that the unlikely used by
> pre_schedule_rt is always incorrect. This makes sense because in
> sched.c we have:
> 
> 	if (prev->sched_class->pre_schedule)
> 		prev->sched_class->pre_schedule(rq, prev);
> 
> And we are saying that prev is unlikely to be an rt task. This looks
> more like a likely candidate to me.

I forgot to add the profiler output:

 correct incorrect  %        Function                  File              Line
 ------- ---------  -        --------                  ----              ----
       0     2248 100 pre_schedule_rt                sched_rt.c           1263
 

-- Steve

> 
> Signed-off-by: Steven Rostedt <srostedt@...hat.com>
> ---
>  kernel/sched_rt.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
> index bac1061..537af77 100644
> --- a/kernel/sched_rt.c
> +++ b/kernel/sched_rt.c
> @@ -1260,7 +1260,7 @@ static int pull_rt_task(struct rq *this_rq)
>  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 > prev->prio)
> +	if (rt_task(prev) && rq->rt.highest_prio > prev->prio)
>  		pull_rt_task(rq);
>  }
>  
> -- 
> 1.6.2
> 
> -- 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ