public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Randy.Dunlap" <rddunlap@osdl.org>
To: Darren Hart <darren@dvhart.com>
Cc: Cícero <cicero.mota@gmail.com>, lkml <linux-kernel@vger.kernel.org>
Subject: Re: Information about move_tasks return
Date: Mon, 22 Nov 2004 20:56:23 -0800	[thread overview]
Message-ID: <41A2C2F7.8080003@osdl.org> (raw)
In-Reply-To: <1101139344.21252.65.camel@farah.beaverton.ibm.com>

Darren Hart wrote:
> On Mon, 2004-11-22 at 08:16 -0400, Cícero wrote:
> 
>>hi
>>
>>I am looking for the result of the function  move_task in
>>
>>kernel/sched.c , I have observed that it returns an int value and as I
>>print it with printk.
>>
>>I have created a int variable 'results_move_task' which capture the result of
>>
>>move_task and I print it with printk("%d",results_move_task); I
>>observed that it often returns the value '1' and sometimes it returns
>>'2' or more. Is it really correct?
> 
> 
> /*
>  * move_tasks tries to move up to max_nr_move tasks from busiest to this_rq,
>  * as part of a balancing operation within "domain". Returns the number of
>  * tasks moved.
>  *
>  * Called with both runqueues locked.
>  */
> static int move_tasks(runqueue_t *this_rq, int this_cpu, runqueue_t *busiest,
>                       unsigned long max_nr_move, struct sched_domain *sd,
>                       enum idle_type idle)
> {
> ...
> 
> 
> So as the "documentation" states, it returns the number of tasks
> actually moved.  For instance, The balancing code may request 4 tasks be
> moved, but for various reasons, only 2 were actually moved to other
> CPUs, move_tasks() would return 2.

and there are a few cases/places where the move target count
is limited to only 1.

-- 
~Randy

  reply	other threads:[~2004-11-23  5:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-22 12:16 Information about move_tasks return Cícero
2004-11-22 16:02 ` Darren Hart
2004-11-23  4:56   ` Randy.Dunlap [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-11-30 22:11 Cícero

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=41A2C2F7.8080003@osdl.org \
    --to=rddunlap@osdl.org \
    --cc=cicero.mota@gmail.com \
    --cc=darren@dvhart.com \
    --cc=linux-kernel@vger.kernel.org \
    /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