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/