Writing some code for poking at CPU caches and the Windows thread scheduler. I want to slow down a thread servicing a syscall as much as possible. Some things to try:
- Spawn a new thread that is pinned to the SMT sibling of the target thread and run a funny function that thrashes/exhausts the shared instruction and data caches. Set it's thread priority to maximum and target thread's to minimum.
- Spawn other fake load threads that are pinned to the same thread as target thread, hopefully causing OS to evict target thread sooner. Set them to maximum priority too.
- All prior tricks assume p-cores, not too familiar with how cache and other resource sharing is done on Intel e-cores but I'll try benchmarking on it anyway.