|On 9/12/07, Kevin D. Kissell <email@example.com> wrote:
SAVE_ALL can certainly nest in MIPS Linux.
This is why there's a check at the beginning of SAVE_SOME to determine whether
the exception was take in user-mode, to see if the kernel stackpointer should be
loaded from memory or computed relative to the current stack
frame. Another thing to keep in mind in looking at these sorts
of optimizations is that each scheduling thread has its own kernel stack area.
So if you're very very motivated, you could conceivably come up with a hack
whereby the first level of exceptions uses your internal RAM array for a
stack, but nested ones use external memory, *but*, you'd at least need room for
as many first-level stack frames in your internal RAM as you have
concurrent processes/threads in the system, or you'd need to mutilate the
context switch code to copy the first level stack frames in and out of external
memory on a context switch. I don't think that's a good path to go down.
thanks for your advice, i think a hack
whereby the first level of exceptions maybe is easy to modify.i will try it
If you have functioning caches, they won't be as
perfect as a scratchpad, but you won't have all the additional context
switch overhead, and they will automagically do approximately what you
want, without your having to change any code.
----- Original Message -----
Sent: Wednesday, September 12, 2007 4:21
Subject: does the SAVE_ALL nesting in
have a mips board, and the SDRAM speed(bus clock) is not too
so i want
change the SAVE_ALL and RESTORE_ALL to use internal-ram(high
i just wonder whether the SAVE_ALL netsting in kernel for mips
if not, i think maybe
1k byte for SAVE_ALL is enough( 32regs X4, and some cp0_regs).
but if the SAVE_ALL nesting, maybe i
need to keep a stack in
thanks for any hints．