high CPU usage in FreeBSD for a PCIe card driver
Steevan Rodrigues
steevanxperia at gmail.com
Wed Jul 11 23:45:43 UTC 2018
Thanks for confirming it. Yes I do very frequent device ioctl calls .
Regards,
Steevan
On Wed, Jul 11, 2018 at 11:52 PM, Andrew Gallatin <gallatin at cs.duke.edu>
wrote:
> On 07/11/18 07:46, Steevan Rodrigues wrote:
>
>> Hello Andrew,
>>
>> Sorry to bother you. I am working on this problem again after a break of
>> few days.
>> I ran following command to get lock statistics when I run my userspace
>> application on a 12 core 24 thread server PC.
>> From this data below to looks like my driver is causing a contention on
>> a kernel lock (pmap ). Am I right ?
>>
>> lockstat -x aggsize=4m -D 20 sleep 10
>>
>> Adaptive mutex spin: 1122679 events in 10.013 seconds (112121 events/sec)
>>
>> Count indv cuml rcnt nsec Lock Caller
>> ------------------------------------------------------------
>> -------------------
>> 1089662 97% 97% 0.00 65375 pmap pmap_extract+0x1d2
>> 31805 3% 100% 0.00 14881 cdev devvn_refthread+0x142
>>
>
>
> Yes. You can get more information if you use the -s 10 argument to
> lockstat. That way, you'll see what's calling pmap_extract.
>
> Are you doing frequent device ioctls?
>
>
> Drew
>
More information about the freebsd-hackers
mailing list