lkml.org 
[lkml]   [2002]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Hyperthreading
On 23 Aug 2002, Gilad Ben-Yossef wrote:
>
> hmm... isn't there an option to tell the kernel you are using a
> HyperThreaded system, or is it detected on runtime? I mean, think about
> a P4 Xeon 2 way SMP - unless told otherwise the kernel will 'see' it as
> a 4 way SMP box *but* the proccessors are not equel!

There is the "noht" boot arg to tell the kernel not to use HT,
and there is the X86_FEATURE_HT cpu capability flag, but I think
the runtime indication you're looking for is smp_num_siblings:
1 without HT, 2 (ever more?) with HT.

> If for example, you have a task running and another task just woke up
> and the scheduler needs to assign a CPU for it, choosing the other
> 'instance' of the same CPU as the already running task to run it on as
> opposed to choosing one of the 'instanaces' of the other seperate CPU
> seems a mistake IMHO, but the scheduler won't be able to make the
> judgment because it doesn't know it is running on a SMT box at all.

SMT I don't know. Your point is valid, and you'll find the 2.4 -aa
and -ac trees (both using newer O1 scheduler) each have code in (or
called out from) kernel/sched.c to deal with that.

The mainline 2.4 does not take that into consideration, and so far
as I can see (please correct me), nor does 2.5 as yet - will probably
get added from 2.4 -aa or -ac in due course. It's not an issue of
correctness, just optimality.

Hugh

-
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-03-22 13:28    [W:0.084 / U:7.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site