RE: [Linux-hls-devel] about the "processes freezing up" bug...
Status: Pre-Alpha
Brought to you by:
lucabe
From: Luca A. <luc...@em...> - 2003-09-22 08:56:51
|
Ok, I've been able to reproduce the bug (thanks to Tony for the test case!!!), and I can confirm that it happens only when the kernel preemption patch is applied. Here is my understanding of the problem: 1) the system enters in kernel mode, for some reason; 2) the kernel decides to unblock task A 3) before returning to user mode (and hence, before calling schedule()), the kernel decides to unblock task B also 4) before switching to user mode, schedule() is invoked... At this point, the Unblock hook is invoked (first for A, and then for B...) 4a) When the Unblock hook is invoked for task A, hls does not know that B is going to block before returning to user mode, hence an HLS scheduler decides to schedule B 4b) but the state of task B is not TASK_RUNNING anymore, hence HLS complains... If this understanding of the problem is correct, then the check in linux/bottom.c:show_tasks() is too strict... Just removing the call to show_tasks() in linux/bottom.c:HLSScheduleThread() should solve the problem (at least, without that call everything seems to work well). Tony, can you try, when you have some time? (you will also have to remove the debugging patch that I sent few days ago). I am still testing, and I hope to come up with a better solution in 2 or 3 days. Thanks, Luca -- _____________________________________________________________________________ Copy this in your signature, if you think it is important: N O W A R ! ! ! -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Hai un problema legato al mondo del verde? Chiedi a Mr. Green! clicca qui: Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=547&d=22-9 |