Re: Knowing which task is current in a CPU [ SMP ]

Rik van Riel (riel@nl.linux.org)
Tue, 6 Jul 1999 23:48:43 +0200 (CEST)


On Tue, 6 Jul 1999, Hugo Varotto wrote:

> I'm currently doing some stuff with SMP kernels, and I'd like to
> know which task is currently running in which CPU.

> The only solution that I found is to go through all the runqueue,

> Does anybody know of other ( more efficient ) way of doing this ?
> I'm working with the 2.2.x series

You obviously haven't taken a look at kernel/scheduler.c, the
kernel is doing exactly what you describe in an efficient way.

cheers,

Rik -- Open Source: you deserve to be in control of your data.
+-------------------------------------------------------------------+
| Le Reseau netwerksystemen BV: http://www.reseau.nl/ |
| Linux Memory Management site: http://www.linux.eu.org/Linux-MM/ |
| Nederlandse Linux documentatie: http://www.nl.linux.org/ |
+-------------------------------------------------------------------+

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/