Re: top stack (l)users for 2.5.69

Helge Hafting
2003-05-08T11:45:22Z

Richard B. Johnson wrote:
> On Wed, 7 May 2003, Timothy Miller wrote:

>>On typical processors, when one gets an interrupt, the current program
>>counter and processor state flags are pushed onto a stack. Which stack
>>gets used for this?
>>
>
>
> In protected mode, the kernel stack. And, regardless of implimentation
> details, there can only be one. It's the one whos stack-selector
> is being used by the CPU. So, in the case of Linux, with multiple

A little contradiction there. "There can only be one" versus
"the one whos stack-selector is being used by the CPU"

Of course there can only be one stack _at a time_,
but the stack selector is switched as part of the context
switch - so there is one stack per process.

The same applies to kernel stacks. There can only be
one at a time, but the kernel stack pointer is
updated on task switches so there is one kernel
stack per process too.

> kernel stacks (!?????), one for each process, whatever process is
> running in kernel mode (current) has it's SS active. It's the
> one that gets hit with the interrupt.

Helge Hafting