public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
To: lk <linux_kernel@patni.com>
Cc: helen monte <hzmonte@hotmail.com>, linux-kernel@vger.kernel.org
Subject: Re: How does 2.6 SMP scheduler initially assign a thread to a run queue?
Date: Wed, 8 Jun 2005 12:03:26 -0700	[thread overview]
Message-ID: <20050608120325.A5554@unix-os.sc.intel.com> (raw)
In-Reply-To: <000e01c56c27$765c4510$5e91a8c0@patni.com>; from linux_kernel@patni.com on Wed, Jun 08, 2005 at 06:11:55PM +0530

On Wed, Jun 08, 2005 at 06:11:55PM +0530, lk wrote:
> > In the 2.6 kernel, there is one run queue per CPU, in case of an SMP.
> > After a thread is created, how does the scheduler determine which run
> > queue it goes to?  
> 
> First it forked process (child) gets the same CPU as that of parent.
> forking a child gets the same CPU and later part of fork will call 
> wake_up_new_task () to fetch the run-queue of the CPU and 
> __activate_task () is called to move task into run-queue. 
> Later rescheduling of the process may move process to another
> run-queues.

In -mm kernels, Nick has recently added balance on exec/fork.

> > By the way, in an SMT/hyperthreading processor, does the latest kernel
> > version assign one run queue per physical CPU, or per virtual 
> > processor?
> > 
> 
> one run-queue per physical CPU

No. Each logical processor has its own runqueue.

thanks,
suresh

  reply	other threads:[~2005-06-08 19:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-07 23:50 How does 2.6 SMP scheduler initially assign a thread to a run queue? helen monte
2005-06-08 12:41 ` lk
2005-06-08 19:03   ` Siddha, Suresh B [this message]
2005-06-08 19:25     ` Steven Rostedt
2005-06-09  6:32       ` How does 2.6 SMP scheduler assign runqueues to multi-cores? helen monte
2005-06-09  7:03         ` Nick Piggin

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=20050608120325.A5554@unix-os.sc.intel.com \
    --to=suresh.b.siddha@intel.com \
    --cc=hzmonte@hotmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux_kernel@patni.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