[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?
    Arun Srinivas wrote:
    > 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 processors?

    You shouldn't be able to select SMT if SMP is not enabled.
    If SMT and SMP is selected, then the scheduler will recognise
    the 2 processors as logical ones.

    > 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?

    Use sched_setaffinity to force each thread onto the particular
    CPU. Use sched_setscheduler to acquire a realtime scheduling
    policy. Then use mutexes to synchronise your threads so they
    run the desired code segment at the same time.

    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.020 / U:74.180 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site