scheduling problem?

William Montgomery (william@opinicus.com)
Thu, 16 Dec 1999 10:58:55 -0500 (EST)


I am trying to isolate the cause of a lost need_resched.
Any response to this post would be greatly appreciated. I know
everyone is busy with pre-2.4 but it seems my recent posts
have been piped to /dev/null :).

I added an mcount call to make ret_from_intr visible in the ktrace
and it is called as expected. The jump to ret_with_reschedule only
occurs if we are not in (VM86 mode or non-supervisor mode), correct?

In the ktrace below the ret_with_reschedule is not executed since
the idle task is in user mode. I thought the idle task was always
checking need_resched so schedule should be called immediately?

c0113297 schedule +<13/284> ( 1.22 ) ( 295924.62 elapsed) pid(289->0)
c0107a77 __switch_to +<f/d8> ( 2.07 ) ( 295925.84 elapsed) pid(0)
c011d21d check_pgt_cache +<d/24> ( 0.30 ) ( 295927.91 elapsed) pid(0)
c011056f do_check_pgt_cache +<f/84> ( 1.36 ) ( 295928.21 elapsed) pid(0)
c010a65d do_IRQ +<d/54> ( 0.36 ) ( 295929.57 elapsed) pid(0)
c010a1df do_8259A_IRQ +<13/b4> ( 2.65 ) ( 295929.93 elapsed) pid(0)
c010a504 handle_IRQ_event +<10/78> ( 0.65 ) ( 295932.57 elapsed) pid(0)
c01baf71 rtc_interrupt +<11/9c> ( 3.98 ) ( 295933.23 elapsed) pid(0)
c0113518 __wake_up +<10/58> ( 0.33 ) ( 295937.21 elapsed) pid(0)
c013205a kill_fasync +<e/54> ( 0.30 ) ( 295937.54 elapsed) pid(0)
c0131f6e send_sigio +<16/f4> ( 6.18 ) ( 295937.84 elapsed) pid(0)
^^^--- send sigio to SCHED_FIFO pid(159)

c0111d79 send_sig +<d/2c> ( 0.27 ) ( 295944.02 elapsed) pid(0)
c011181f send_sig_info +<13/28c> ( 0.68 ) ( 295944.29 elapsed) pid(0)
c01117a6 ignored_signal +<e/74> ( 0.53 ) ( 295944.97 elapsed) pid(0)
c0112e19 wake_up_process +<d/54> ( 0.28 ) ( 295945.50 elapsed) pid(0)
c0112d92 reschedule_idle +<e/88> ( 5.63 ) ( 295945.78 elapsed) pid(0)
c011301a mod_timer +<e/188> ( 0.86 ) ( 295951.41 elapsed) pid(0)
c010a119 enable_8259A_irq +<d/3c> ( 0.74 ) ( 295952.27 elapsed) pid(0)
c010a682 do_IRQ +<32/54> ( 0.15 ) ( 295953.01 elapsed) pid(0)
c010a69d do_IRQ +<4d/54> ( 0.21 ) ( 295953.16 elapsed) pid(0)
c0108f27 ret_from_intr +<7/30> ( 7217.82 ) ( 295953.37 elapsed) pid(0)
^^^--- idle task never sees need_resched?

c010a65d do_IRQ +<d/54> ( 0.19 ) ( 303171.19 elapsed) pid(0)
c010a1df do_8259A_IRQ +<13/b4> ( 2.05 ) ( 303171.39 elapsed) pid(0)
c010a504 handle_IRQ_event +<10/78> ( 0.34 ) ( 303173.44 elapsed) pid(0)
c010e1de timer_interrupt +<12/12c> ( 6.21 ) ( 303173.78 elapsed) pid(0)
c011419d do_timer +<d/5c> ( 0.53 ) ( 303179.99 elapsed) pid(0)
c010a119 enable_8259A_irq +<d/3c> ( 0.83 ) ( 303180.52 elapsed) pid(0)
c010a682 do_IRQ +<32/54> ( 0.16 ) ( 303181.35 elapsed) pid(0)
c011b640 do_bottom_half +<10/78> ( 0.33 ) ( 303181.51 elapsed) pid(0)
c0113e64 timer_bh +<10/33c> ( 0.45 ) ( 303181.84 elapsed) pid(0)
c0113cbe update_wall_time +<e/58> ( 0.24 ) ( 303182.30 elapsed) pid(0)
c0113bfa update_wall_time_one_tick +<e/c4> ( 0.35 ) ( 303182.54 elapsed) pid(0)
c0113df7 update_process_times +<f/6c> ( 0.19 ) ( 303182.89 elapsed) pid(0)
c0113d18 update_one_process +<10/e0> ( 1.29 ) ( 303183.08 elapsed) pid(0)
c010a69d do_IRQ +<4d/54> ( 0.13 ) ( 303184.37 elapsed) pid(0)
c0108f27 ret_from_intr +<7/30> ( 0.39 ) ( 303184.50 elapsed) pid(0)
c0113297 schedule +<13/284> ( 0.62 ) ( 303184.89 elapsed) pid(0->159)
^^^--- how does need_resched reappear?

Is the above analysis correct? I must be missing something obvious.

Wm

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/