lkml.org 
[lkml]   [2005]   [Jun]   [8]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateWed, 8 Jun 2005 12:03:26 -0700
From"Siddha, Suresh B" <>
SubjectRe: How does 2.6 SMP scheduler initially assign a thread to a run queue?
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-06-08 19:09    [from the cache]
©2003-2008