1

I echoed 1 to tracing_on in /sys/kernel/debug/tracing directory and echoed 0 again after a second. However, the timestamp of the first entry is 216.852 and that of the last entry is 234.136 giving me a total time span of the run of about 18 seconds. How is that possible? And I've tried this many times, on different computers; yet I get an unusual time span. Am I going wrong somewhere?

1 Answers1

0

Without knowing the exact reason, I do know that Linux is not a real time OS, so operations are not guaranteed to work in a give time. Also, given that tracing on/off operations are fairly low priority, chances are that the kernel is waiting for an appropriate time to action your request, and this is the delay you are experiencing.

If the operation is asynchronous, then when you write to the file, the write command will return immediately, storing the request within the kernel - but the kernel will read and act on the change sometime later.