Skip to content
Advertisement

How to estimate the time for spinlock holing/waiting time?

I’m doing a research on spinlock in Linux kernel. And I need to estimate the time for lock holding and lock waiting. To do that, I first tried to modify the spinlock function (arch_spin_lock()) but I could not modify that function because I could not build the kernel. This function was originally an inline function, but I think it was a problem because I made the function too long.

After I already did googling enough, I could not find any way to do that. So I’m asking this question. Is there a way to achieve that goal? I think there is a way to use msr or a system utility.

Please give me some hint.

Thannks!

Advertisement

Answer

Check out man perf-lock (or its online page)

I think there is a way to use msr or a system utility.

perf uses MSR and is a system utility, so I suppose that’s the way you are looking for.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement