On Apr 22, 2009, at 4:01 AM, Paul D. Buck wrote:

>
> On Apr 22, 2009, at 12:24 AM, David Anderson wrote:
>
>> There are many reports that the current client preempts
>> jobs before their time slice is up, for no good reason (see below).
>>
>> The code that enforces time slicing (from client/cpu_sched.cpp)
>> is as follows (line 913)
>>            preempt_atp = preemptable_tasks.back();
>>            if (rp->project->cpu_pwf.deadlines_missed_copy ||
>> finished_time_slice(preempt_atp)) {
>>              ...
>>                preempt_atp->next_scheduler_state =
>> CPU_SCHED_PREEMPTED;
>>
>> In other words, it only preempts a job if its time slice is up,
>> or if there's a job in deadline trouble.
>> finished_time_slice() is define on line 134:
>>
>> static inline bool finished_time_slice(ACTIVE_TASK* atp) {
>>    double time_running = gstate.now - atp-
>>> run_interval_start_wall_time;
>>    bool running_beyond_sched_period = time_running >=
>> gstate.global_prefs.cpu_scheduling_period();
>>    double time_since_checkpoint = gstate.now - atp-
>>> checkpoint_wall_time;
>>    bool checkpointed_recently = time_since_checkpoint < 10;
>>    return (running_beyond_sched_period && checkpointed_recently);
>> }
>>
>> I haven't been able to find the problem here.
>> A big (virtual) prize will go to anyone who can.
>

> Or to put it another way, if the time to run the most preemptable task
> and the task with peril is less than the deadline should we be pre-
> empting the task in the first place?
> _______________________________________________

While we are rummaging the code here ... I don't see where the task  
that might trigger the deadline issue is identified in the debugs.   
Or, to put it mildly, If I did identify the issue at hand, the second  
issue is the question of deadlines... is the client making the right  
decisions about deadlines.  We need to have a clear identification of  
the task that is "seemingly" in peril and the data so that we can  
figure out if the right decisions are being made, or, as I suspect,  
the client is panicing over nothing at all ...
_______________________________________________
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.

Reply via email to