You are not logged in.

#1 2010-05-11 14:45:21

kr22
Member
Registered: 2008-01-19
Posts: 8

iowait accounting in the kernel

Just had a general kernel programming question, not Arch specific.

From browsing around the kernel source, it is my understanding the kernel accounts for idle CPU time spent waiting on IO (%iowait in vmstat) through the io_schedule() function.

It seems to be common practice to use the wait_event() function to wait for an event (duh) and this function uses schedule() to yield the CPU.

So if waiting for an IO event, should the use of wait_event be avoided? Since proper IO wait time accounting will not take place.

It seems like there should be an equivalent wait_io_event() function which uses io_schedule() instead of schedule().

I'm not very familiar with the kernel so I might be missing something here.

Any thoughts?

Thanks

Last edited by kr22 (2010-05-11 15:09:50)

Offline

Board footer

Powered by FluxBB