public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* printing current system time from kernel space
@ 2008-09-22  5:18 George Nychis
  2008-09-22  7:07 ` Sitsofe Wheeler
  2008-09-22 20:28 ` john stultz
  0 siblings, 2 replies; 6+ messages in thread
From: George Nychis @ 2008-09-22  5:18 UTC (permalink / raw)
  To: linux-kernel

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-09-22 20:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-22  5:18 printing current system time from kernel space George Nychis
2008-09-22  7:07 ` Sitsofe Wheeler
2008-09-22 15:11   ` George Nychis
2008-09-22 20:28 ` john stultz
2008-09-22 20:30   ` john stultz
2008-09-22 20:33     ` George Nychis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox