Re: Quick question about hyper-threading

Robert Love (rml@tech9.net)
13 Apr 2003 00:06:43 -0400


On Sat, 2003-04-12 at 23:13, Timothy Miller wrote:
> On a hyper-threaded CPU, it seems to me that there could be a lot of
> cache-thrashing if the two processes running are completely unrelated. On
> the other hand, if one process has two threads, then they would benefit (or
> hurt less) from the cache-sharing, because they share the same memory space.
> Does the HT-aware scheduler attempt to take this into account by scheduling
> two related threads to run simultaneously on the same CPU as often as
> possible (unless you're in a multi-processor system and another CPU would
> otherwise be idle)?

No, the current scheduler (HT or stock 2.5) does not do this.

Your theories are correct. It would be interesting to try this and see.

It is nontrivial to do the ->mm checks in the scheduler though -
certainly they cannot be done easily (if at all) in constant-time (i.e.,
it won't be O(1)).

Robert Love

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