Closed EchterAgo closed 10 months ago
Some more testing revealed that last_stats_time_delta
can be zero, maybe timer granularity? ChatGPT tells me the timer granularity of KeQueryTickCount
is around 838 nanoseconds, doing 1000 reclaims should have taken longer than that, shouldn't it? I further optimized reclaim, maybe we are too fast now :D
I'm pretty sure ChatGPT is wrong about the granularity of KeQueryTickCount
and yes, it does look like my last change sped up the loop a lot, now it is at ~64000 reclaims per second, where it was at hundreds and lower before, the time required grew exponentially with the number of nodes because we restarted the loop.
Yea, so the gethrtime
value updates only every 15.625 milliseconds, if we do 1000 iterations in that time we get a divide by zero.
We should probably switch gethrtime
to KeQueryPerformanceCounter
Ok, rebased on top of the gethrtime
change and added a MAX
to prevent divide by zero.
We can also skip this commit, I just used it to measure #328 before and after.
Closing because merged as part of #328
This shows how many reclaims have been processed in thousand increments and also how many reclaims are processed per second.