Re: 2.2.18Pre Lan Performance Rocks!

From: Daniel Phillips (news-innominate.list.linux.kernel@innominate.de)
Date: Wed Nov 01 2000 - 00:38:55 EST


"Jeff V. Merkey" wrote:
> A "context" is usually assued to be a "stack". The simplest of all
> context switches is:
>
> mov x, esp
> mov esp, y

Presumeably you'd immediately do a ret to some address, and there pop a
base address off the stack to get some global memory. Is that right?
Your context switches would be inline, and you'd have hardcoded which
process to execute next in most cases.

I'll buy the concept that changing stacks amounts to changing contexts,
so long as you follow certain rules. Obviously, rules are what define a
context. What are the two instructions that precede and the two
instructions that follow? I'd guess, something like this:

   push bp
   push $1
   mov x, esp
   mov esp, y
   ret
$1 pop bp

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



This archive was generated by hypermail 2b29 : Tue Nov 07 2000 - 21:00:08 EST