[lkml]   [2005]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: help needed pls. scheduler(kernel 2.6) + hyperthreaded related questions?
If the SMT (apart from SMP) support is enabled in the  .config file, does 
the kernel recogonize the 2 logical processor as 2 logical or 2 physical

Also, as the hyperthreaded processor may schedule 2 threads in the 2 logical
cpu's, and it may not necessarily be form the same process i.e., the 2
thread it schedules may be from the same or from the different process.

So, is there any way I can tell the scheduler (assuming I make the scheduler
recogonize my 2 threads..i.e., it knows their pid) to schedule always my 2
threads @ the same time? How do I go abt it?

Pls. help.Thanks in Advance.

>From: Nick Piggin <>
>To: Arun Srinivas <>
>Subject: Re: help needed pls. scheduler(kernel 2.6) + hyperthreaded related
>Date: Wed, 23 Mar 2005 10:16:20 +1100
>Arun Srinivas wrote:
>>Pls. help me. I went through the sched.c for kernel 2.6 and saw that it
>>hyperthreading.I would be glad if someone could answer this
>>am not wrong a HT processor has 2 architectural states and one execution
>>unit...i.e., two pipeline streams)
>>1)when there are 2 processes a parent and child(created by fork()) do they
>>get scheduled @ the same, when the parent process is put into
>>pipeline, do the child also gets scheduled the same time?
>>2) what abt in the case of threads(I read tht as opposed to
>>threads are treated as processes) ..kernel 2.6 treats threads as threads.
>>So, when two paired threads get into execution are they always scheduled
>>the same time?
>>Also, it would be helpful if someone could suggest which part of sched.c
>>shud i look into to find out how threads are scheduled for a normal
>>processor and for a hyperthreaded processor
>It is pretty tricky. Basically processes on different CPUs are
>scheduled completely independently of one another. The only time
>when they may get moved from one CPU to another is with
>load_balance, load_balance_newidle, active_load_balance,
>try_to_wake_up, sched_exec, wake_up_new_task.

News, views and gossip. Get it all at MSN

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-04-06 13:30    [W:0.053 / U:8.940 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site