[PATCH V4 3/5] idle: Reorganize the idle loop