On Apr 22, 2009, at 6:12 AM, [email protected] wrote: > All tasks have to be pre-emptable in the case of a task that > requires CPU > time now.
Which is fine. Except, the initialization of all tasks to preempt means that the whole loop where we test to see if a task is preemptable is wasted. From line 905 to 939 there is no point to this code as it stands now. All tasks are flagged preemptable, why then bother with 905 to 939 to see if any task should be tagged as CPU_SCHED_PREEMPTED, all tasks have already been so tagged. So, the tasks that "want" to run are assigned a run state in 950 to 952 regardless of TSI or checkpoint state. You cannot make all tasks as preempt and then be surprised when TSI and all other considerations are ignored. Because of the spaghetti logic use of "break" and "continue" I cannot follow the logic flow of 880 to 953, but the two blocks of code (845-847 and 880-953) as best as I can tell is that all tasks are marked preempt and then those that the client wants to run are marked as run. What should be happening is at 845-847 is that the logic of 905-939 should be used to determine if any tasks are preemptable. then in the loop of 880 to 952 those tasks that ARE detected as preemptable can then be used for the new tasks that should be scheduled. I cannot come up with an example where this is actually happening for the simple reason that the use of the debug flags seems to suppress the output of the normal messages. However I do find it interesting that on a system that has run for 6 hours has NEVER preempted a task because the "preempting" message never shows up. Not once. Never... The bottom line, 915-926 is never executed. If, as Dr. Anderson asserts, TSi is respected, then that code would be executed and I would not start by flagging ALL tasks as preemptable ... _______________________________________________ boinc_dev mailing list [email protected] http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev To unsubscribe, visit the above URL and (near bottom of page) enter your email address.
