Re: [patch] i386: use C code for current_thread_info()

From: Avi Kivity
Date: Tue Jun 13 2006 - 05:26:10 EST


Andreas Mohr wrote:

An entirely different way would be to store the stack base value in a
global variable and update that on each context switch, but it would increase
context switch overhead and have >= 2 cycles access time for L1 cache (which
would be the best memory access case!), which would most likely be more
combined overhead than an AGI stall (I was mistaken in declaring the stall
a pipeline flush - it's only a stall for a couple cycles, not a full flush
wasting ~ 15 cycles).


That wouldn't work on SMP. You'd need per-cpu variables, which are likely even slower.

[One way around that would be to use a segment register for the per-cpu areas]

--
error compiling committee.c: too many arguments to function

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