> Right, look at uprobes, it does exactly all this with a single page.
> Slot allocation will block waiting for a free slot when all are in use.
I don't see a reason to change my 300 lines design into much more
lengthy code. That code has more links to the rest of kernel and high
possibility to execute atomic operation/locks/mutex/etc - I can't do it
for emulation of MIPS locking instructions.
It isn't just the number of lines of code that is important.
Doesn't your solution consume an extra page for each thread requiring emulation? That could be a significant amount of memory in a system with many threads.
Are you are using this to emulate atomic operations in addition to FPU branch delay slot instructions? Where is the code that does that?