Open mhomidi opened 3 months ago
Hi mhomidi:
since you already have a solution, perhaps it's better to just go ahead and open an PR, mark as draft or RFC if you are not sure.
It's an overhead to create a patch from your snippet; Also you should be properly credited for the contribution.
Problem
Hi everyone, When we call
clock_gettime
syscall, we get theuserTime
andsystemTime
for CPU state and make their scale to nano-second inqkernel/src/qlib/kernel/threadmgr/task_sched.rs:154
. Then in theqkernel/src/qlib/kernel/threadmgr/task_sched.rs:454
and/orqkernel/src/qlib/kernel/threadmgr/task_sched.rs:457
, we again scale and multiply them to 1000 to get nano-second again while their are in nano-second scale by themselves. This make some issue inwait
syscall and probably other places.If you want to see the issue, try to run Quark in two machines with different clock frequency. (Actually it just be accurate when clock freq is 1GHz)
Solution
We just need to change function
Now
in lineqkernel/src/qlib/kernel/threadmgr/task_sched.rs:451
and remove theScale
and*1000
: