<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Jan 29, 2014, at 5:05 PM, Björn Brandenburg <<a href="mailto:bbb@mpi-sws.org">bbb@mpi-sws.org</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">1. Should we use the ktime_get() to get the time? Because it is a kernel function call, it takes longer time than just read the RDTSC value. Why use a kernel space function call instead of a user space function all? I am not sure about that, so I have this question.<br></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">All tracing occurs in the kernel. The scheduler is implemented in the kernel.</span></blockquote></div><br><div>Just to interject, tracing from userspace to get timing data is usually a bad idea.  For example, it’s impossible to reliably record the release time of a task from userspace—there may be a delay from when a job is released and when it is first scheduled.  There is some useful time tracing that you can do from userspace, but you have to be very careful and be sure you’re doing things correctly.</div><div><br></div><div>-Glenn</div></body></html>