lkml.org 
[lkml]   [2008]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectprinting current system time from kernel space
Hi all,

Please CC me on any responses.

I am looking to measure the latency of USB data between kernel space and
user space. The user space driver uses a URB to get data from the
device to the kernel and finally to user space.

To measure this latency, I was thinking of printing the current system
time when a read occurs/succeeds in drivers/usb/core/devio.c at the
function usbdev_read(), and then again in user space when the URB
succeeds in reading. Then, I could subtract the two times to get the
latency.

I spent some time googling, but could not find out how or if it is
possible to read the current system time in kernel space. I could
insert a printk() somewhere in usbdev_read() then.

If it is not possible to read the current system time, is there some
other shared clock between kernel and user space that I could use for this?

Thank you!
George


\
 
 \ /
  Last update: 2008-09-22 07:39    [W:1.044 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site