LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   sleep time = sys time for pread? (https://www.linuxquestions.org/questions/linux-kernel-70/sleep-time-%3D-sys-time-for-pread-698730/)

wqhhust 01-20-2009 09:08 PM

sleep time = sys time for pread?
 
pread is a syscall, after the user process called pread, the user process will be put into sleep queue and sleep, suppose the pread will return after 10ms, then this 10ms will be counted as sleep time.

For the real work of pread, a kernel process will request the data from disk to be read in, so this 10ms is also counted as sys time. Then this 10ms will be counted 2 times, once in sleep time and once in sys time. And the total percent time of sys, sleep, user might be larger than 100%.

Although I am sure the sys%+sleep+usr% should be 100%, but not sure where in my above statement is wrong. Could you anyone help me?

Thanks,
Daniel,


All times are GMT -5. The time now is 04:18 PM.