Re: how does kernel get the "current" task struct?

From: Horst von Brand (vonbrand@sleipnir.valparaiso.cl)
Date: Fri Feb 04 2000 - 12:37:53 EST


Jun Sun <jsun@mvista.com> said:

[...]

> I suppose if you have a global pointer "current", you don't even need to
> do "andl" instruction. (But you will need to update "current" whenever a
> context switch happens, and you'll probably have a "current" array in the
> CMP version.)

A single memory access can cost you hundreds of cycles with current CPUs.

-- 
Horst von Brand                             vonbrand@sleipnir.valparaiso.cl
Casilla 9G, Viņa del Mar, Chile                               +56 32 672616

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



This archive was generated by hypermail 2b29 : Mon Feb 07 2000 - 21:00:11 EST