Skip to content
Advertisement

How to find out which kernel spinlock eat up most of CPU?

I’m doing performance tuning of a crypto software, which is run on Linux and utilizes hardware crypto acceleration device.

When the load is given over some threshold, kernel _spn_lock begin to eat most of the CPU’s time. The following perf top screenshot shows ~30% of CPU is taken by _spin_lock, but it goes up over 50% if a load is increased and overall performance degrades.

I can not tune up the performance of the software without finding out which spinlock causes this situation.

I checked up similar questions on stackoverflow, but I cannot find a answer on how to discover which spinlock spins. Is there any way to locate the spinlock position? Any tips or suggestions would be deeply appreciated.

JavaScript

Advertisement

Answer

Do you want to find where _spin_lock is called?

Try it ftrace

JavaScript

For more information about ftrace, see here https://lwn.net/Articles/365835/

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