On 13-04-08 21:55, Robert P. J. Day wrote:
(*) Per thread and a bit less in fact, since the current thread's
thread_struct lives at the bottom. The option furthermore also means
you get seperate interrupt stacks (also meaning that depending on
usage you might even end with more generally available stack with
the 4KSTACK option then without, when interrupt handlers share the
stack).
as i understand it (and i just want to make sure i have this right),
on x86, if you have 8K stacks, then an interrupt simply "borrows" the
stack of the process that was interrupted, right? so even though
interrupt handlers don't run in a process context, they'll quietly use
the stack of that process anyway.
On x86-32, yes.
if, however, you select 4K stacks, what happens? is there now a
single, separate 4K stack for interrupts, completely independent from
each process' kernel stack?
"Per-CPU single" yes and completely independent (and with CONFIG_4KSTACKS
there is also a second per-CPU 4K stack for softirq's, which also used to
run on the process' kernel stack).
x86-64 has always used seperate the IRQ stack(s) and has hardware support
for them. I believe it actually has at least a few IRQs with private IRQ
stacks (private to the single IRQ even) but I'm too sunday to check right
now. Still on x86-32 myself...
(by the way, my "current thread's thread_struct" above should be "current
thread's struct thread_info").
Rene.
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ