On Friday 12 December 2008 22:45:11 Ma, Chinang wrote:
*snip*
What is the time needed to actually write the data to disk?
OK, let me see if I got this right:
- You have a foreground process that runs with normal priority (i.e. +19
to -20)
- This process appends data to a buffer, records the time and signals the
log-writer to flush the buffer to disk as soon as possible
- The log-writer is awoken, writes the buffer to disk, signals the foreground
process that the job is done and exits.
- The foregorund process records the time when it is awoken.
Is this really a kernel-scheduler problem? Or is it an error in the way the
timestamps are recoreded?
Does not the time recorded then depend upon how the foreground process is
scheduled, and not the log-writer? What happens if you log the time at the
start and end of the log-writer function? Then you would get the time-delta
between signaling and rr-wakeup, as well as time spent writing buffer to
disk. By using the final timestamp in the foreground process, you'd get the
latency for the last foreground-process wakeup as well.
Or am I completely missing the point here?
So, you don't really know if the initial process that recorded the timestamp
is the one who is awoken - so the time taken could be *very* long?
henrik
--