unreliable time function inside IRQ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear all,
	Had to bring this question again to see whether anyone see the same problem. IIO fetches the timestamp inside IRQ using iio_get_time_ns(), which in turn call ktime_get_real_ts(&ts). However, I notice that the clock taken during interrupt is not always reliable. Sometimes the clock does not update. It is updated after one or more interrupts. It is very easy to reproduce. First find a hardware generating fixed interval of interrupts and using IIO driver to run it. Print out the timestamp. You could find that the timestamp distance is not always correct. For example, if you run a 5 Hz interrupt, most of time you will interrupt timestamp interval is around 200ms. However, sometimes, you could see interval sequence like ...200, 192, 208, 200, 200, 182, 218, 200.......
I searched online and only found one result, which is exactly the same as I observed. Below is the link:
http://stackoverflow.com/questions/17080516/unable-unreliable-to-use-clock-gettime-in-hard-irq-context
But no one answer the question.
	Is there anyone see the same problem? Thanks.

Best Regards,

Ge GAO

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux