But if idle_balance successfully pulled tasks from other CPUs onto
current CPU, the scheduler will choose the newly migrated task to run
instead of idle task. So this probe definition is not accurate.
It seems that the following probe will correctly reflect the idle
if(! runqueue->nr_running) //pseudo code
then scheduler will pick idle task to run
But currently systemtap doesn't support return of inline function.
Another way is to probe __switch_to to check if next->pid is zero.
But put a probe handler onto __switch_to is more expensive than onto
So anybody has some good ideas of catching the cpu idle events? Or is
there a plan to implement the return of inline function?