[ILUG] 2.6 Kernel + Hyperthreading
typedef at eircom.net
Thu Sep 9 15:56:52 IST 2004
P at draigBrady.com wrote:
>> 1) How well will *non-threaded* applications perform? Will they only
>> get 1/2 the CPU power?
>> - Most of the apps are not threaded, so might I be better off
>> not using the HT capabilities?
> If your app has only one thread, then it will only use 1 CPU.
Just for clarity, this is the case with a genuinely SMP machine too, is
it not? ie the scheduler decides which CPU to run
process(x)/(lightweight kernel thread)(x)/execution context(x) in, where
there is no gaurantee that an application with two threads won't end up
running in the 'one' CPU on an SMP system.
Is this not the case for a HT enabled CPU, and if not, then there must
be some recent evolution in the kernel to differentiate a thread from a
process and consequent linuxthreads code ?
> However you mention you have many apps, and also there are
> the usual system apps. So you will may gain from running
> those in parallel.
This makes a bit more sense to my 'idea' of what having two logical CPUs
would mean... ie, the _possibility_ for a
fork(); system call to have a child process execute on a different
If it is _not_ the case that a regular regular process can execute on
'either' of the logical CPUs on HT enabled CPU, then there must have
been some recent evolution with 2.6 and linuxthreads, which clearly
differentiates a process from a thread... which would allow
process(thread(x)) use the second logical CPU while process(regular(x))
is limited to 'always' execute on CPU A.
I don't think that's the case, to my mind two logical CPUs, would mean
that while a single process would only ever execute on _one_ 'logial'
CPU on a HT machine... that the scheduler could put that process to
execute on _either_ of the logical CPUs.
Can anybody say for sure, if this assertion is correct or false?
More information about the ILUG