the cost of context switch consists of two parts, one of which can be subdivided:
1. register save/restore
1a. user-space only registers
1b. full register save/restore, required in kernel space
2. the cost of the TLB flush, which is in turn proportional to the working set size of the switched-to process (i.e. if you don't touch much memory after the context switch, the cost is lower than if you do)
I am not sure that any assembler instructions could address either of these.
the cost of context switch consists of two parts, one of which can be subdivided:
1. register save/restore
2. the cost of the TLB flush, which is in turn proportional to the working set size of the switched-to process (i.e. if you don't touch much memory after the context switch, the cost is lower than if you do)I am not sure that any assembler instructions could address either of these.
What do you have in mind?