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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131004153401.76fbbb0e@gandalf.local.home>
Date:	Fri, 4 Oct 2013 15:34:01 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Shawn Bohrer <shawn.bohrer@...il.com>
Cc:	Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	linux-kernel@...r.kernel.org, Mike Galbraith <mgalbraith@...e.de>,
	tomk@...advisors.com, Shawn Bohrer <sbohrer@...advisors.com>
Subject: Re: [PATCH] sched/rt: Remove redundant nr_cpus_allowed test

On Fri,  4 Oct 2013 14:24:53 -0500
Shawn Bohrer <shawn.bohrer@...il.com> wrote:

> From: Shawn Bohrer <sbohrer@...advisors.com>
> 
> In 76854c7e8f3f4172fef091e78d88b3b751463ac6 "sched: Use
> rt.nr_cpus_allowed to recover select_task_rq() cycles" an optimization
> was added to select_task_rq_rt() that immediately returns when
> p->nr_cpus_allowed == 1 at the beginning of the function.  This makes
> the latter p->nr_cpus_allowed > 1 check redundant and can be removed.
> 
> Signed-off-by: Shawn Bohrer <sbohrer@...advisors.com>

Reviewed-by: Steven Rostedt <rostedt@...dmis.org>

-- Steve

> ---
>  kernel/sched/rt.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
> index 01970c8..ceebfba 100644
> --- a/kernel/sched/rt.c
> +++ b/kernel/sched/rt.c
> @@ -1213,8 +1213,7 @@ select_task_rq_rt(struct task_struct *p, int sd_flag, int flags)
>  	 */
>  	if (curr && unlikely(rt_task(curr)) &&
>  	    (curr->nr_cpus_allowed < 2 ||
> -	     curr->prio <= p->prio) &&
> -	    (p->nr_cpus_allowed > 1)) {
> +	     curr->prio <= p->prio)) {
>  		int target = find_lowest_rq(p);
>  
>  		if (target != -1)

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