mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Shawn Bohrer <shawn.bohrer@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-kernel@vger.kernel.org, Mike Galbraith <mgalbraith@suse.de>,
	tomk@rgmadvisors.com, Shawn Bohrer <sbohrer@rgmadvisors.com>
Subject: Re: [PATCH] sched/rt: Remove redundant nr_cpus_allowed test
Date: Fri, 4 Oct 2013 15:34:01 -0400	[thread overview]
Message-ID: <20131004153401.76fbbb0e@gandalf.local.home> (raw)
In-Reply-To: <1380914693-24634-1-git-send-email-shawn.bohrer@gmail.com>

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

> From: Shawn Bohrer <sbohrer@rgmadvisors.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@rgmadvisors.com>

Reviewed-by: Steven Rostedt <rostedt@goodmis.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)


  reply	other threads:[~2013-10-04 19:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-04 19:24 Shawn Bohrer
2013-10-04 19:34 ` Steven Rostedt [this message]
2013-10-06 14:04 ` [tip:sched/core] " tip-bot for Shawn Bohrer

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=20131004153401.76fbbb0e@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgalbraith@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=sbohrer@rgmadvisors.com \
    --cc=shawn.bohrer@gmail.com \
    --cc=tomk@rgmadvisors.com \
    /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

all inboxes | Powered by JetHome®