From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Arun Srinivas <getarunsri@hotmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: help needed pls. scheduler(kernel 2.6) + hyperthreaded related questions?
Date: Wed, 23 Mar 2005 18:37:16 +1100 [thread overview]
Message-ID: <42411CAC.5000808@yahoo.com.au> (raw)
In-Reply-To: <BAY10-F5987CA2A1E1D6C406F5371D94F0@phx.gbl>
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.
>
Yes.
> 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.
next prev parent reply other threads:[~2005-03-23 7:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-22 22:09 help needed pls. scheduler(kernel 2.6) + hyperthreaded related questions? Arun Srinivas
2005-03-22 23:16 ` Nick Piggin
2005-03-23 6:07 ` Arun Srinivas
2005-03-23 7:37 ` Nick Piggin [this message]
2005-03-23 9:47 ` Arun Srinivas
2005-03-24 0:17 ` Nick Piggin
2005-03-29 3:28 ` sched_setscheduler() and usage issues ....please help Arun Srinivas
2005-03-29 4:40 ` Steven Rostedt
2005-03-29 4:51 ` Lee Revell
2005-03-29 6:03 ` Jan Engelhardt
2005-03-29 11:35 ` Steven Rostedt
2005-03-29 11:38 ` Jan Engelhardt
2005-03-29 11:43 ` Arjan van de Ven
2005-03-29 11:46 ` Jan Engelhardt
2005-03-23 7:07 ` help needed pls. scheduler(kernel 2.6) + hyperthreaded related questions? Jan Engelhardt
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=42411CAC.5000808@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=getarunsri@hotmail.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