public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
To: Peter Williams <pwil3058@bigpond.net.au>
Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>,
	Andrew Morton <akpm@osdl.org>,
	"Chen, Kenneth W" <kenneth.w.chen@intel.com>,
	Con Kolivas <kernel@kolivas.org>, Ingo Molnar <mingo@elte.hu>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Mike Galbraith <efault@gmx.de>,
	Nick Piggin <nickpiggin@yahoo.com.au>
Subject: Re: [PATCH] sched: Avoid unnecessarily moving highest priority task move_tasks()
Date: Tue, 25 Apr 2006 14:32:11 -0700	[thread overview]
Message-ID: <20060425143211.A24677@unix-os.sc.intel.com> (raw)
In-Reply-To: <444D89A8.7070109@bigpond.net.au>; from pwil3058@bigpond.net.au on Tue, Apr 25, 2006 at 12:30:00PM +1000

On Tue, Apr 25, 2006 at 12:30:00PM +1000, Peter Williams wrote:
> Siddha, Suresh B wrote:
> > And we also need to initialize busiest_best_prio_seen inside this check.
> > (like in my patch)
> > 	if (busiest->expired->nr_active) {
> 
> Why?  It's already initialized.  If the current running task has 
> prio==busiest_best_prio then we know that can_migrate_task() will 
> prevent it from being moved so it's safe to move any other tasks we meet 
> with that priority.
> > And we need to reset busiest_best_prio_seen to '0' whenever we finished
> > the checking of expired list (and move onto active list) and there are
> > no best prio tasks on expired list..
> 
> No we don't.  Once we've skipped one it's OK to move any others that we 
> find.  We'll never move more than one as a result of overriding the skip 
> anyhow .

Ok.

> 
> > 
> >>> @@ -2072,6 +2067,13 @@ static int move_tasks(runqueue_t *this_r
> >>>  	if (busiest->expired->nr_active) {
> >>>  		array = busiest->expired;
> >>>  		dst_array = this_rq->expired;
> >>> +		/*
> >>> +		 * We already have one or more busiest best prio tasks on
> >>> +		 * active list.
> >> This is a pretty bold assertion.  How do we know that this is true.
> > 
> > That comment refers to when 'busiest_best_prio_seen' is initialized to '1'.
> > Comment needs to be fixed.
> 
> But you initialized it to zero.

That comment refers to the assignment code below it..

Anyhow, now that we are going with fixes to your patch, this is a moot point.

thanks,
suresh

      reply	other threads:[~2006-04-25 21:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-21  4:22 [PATCH] sched: Avoid unnecessarily moving highest priority task move_tasks() Peter Williams
2006-04-22  0:34 ` Siddha, Suresh B
2006-04-22  1:31   ` Peter Williams
2006-04-24 19:00     ` Siddha, Suresh B
2006-04-24 23:04       ` Peter Williams
2006-04-24 23:48         ` Siddha, Suresh B
2006-04-25  2:30           ` Peter Williams
2006-04-25 21:32             ` Siddha, Suresh B [this message]

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=20060425143211.A24677@unix-os.sc.intel.com \
    --to=suresh.b.siddha@intel.com \
    --cc=akpm@osdl.org \
    --cc=efault@gmx.de \
    --cc=kenneth.w.chen@intel.com \
    --cc=kernel@kolivas.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=nickpiggin@yahoo.com.au \
    --cc=pwil3058@bigpond.net.au \
    /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