This caused a huge delay!!!!
I found where the cycles were going. Awesome!
Same user code as before, but the Kernel only changes the SYSRETQ entry code once.
If no context switching is required the Kernel can process just over 9 million queued messages per second per core.
From just over 2 million to just over 9.2 million, well worth tracking it down.
Great, averaging 202 cycles from user code to kernel to message queue, off message queue, a few checks, the back into user space.
Now I am happy, time to more on to the next step....
tsdnz wrote:Today tested the message queue, similar to Windows PostMessage.
With a 1.9 GHz machineUsed SysRetQ instead of IRETQ to enter ring 3, gaining around more speed.
- If no context switching is required the Kernel can process just over 2 million queued message per second per core.
- If a context switch is required the Kernel can process just over 1 million queued message per second per core.
Here is the User Program.Code: Select all
volatile QWORD Me = 0x0; void TestReentry() { auto t = (volatile QWORD*)Util.GetVirtualAddress_2m(100, 0, 0, 0); *t = Me; Me++; Cloud::SysCall_Queue(Cloud::tSysCall_Yeild_Option::YeildAlways, Cloud::tSysCall_Queue_Where::Append, TestReentry); }; void StartUserCode(void) { auto t = (volatile QWORD*)Util.GetVirtualAddress_2m(100, 0, 0, 0); Me = 0x0; *t = 0x44; Cloud::SysCall_Queue(Cloud::tSysCall_Yeild_Option::YeildAlways, Cloud::tSysCall_Queue_Where::Append, TestReentry); }