- client: in the final stage of CPU scheduling,

give preference to multi-threaded jobs.
    Avoid running N-1 1-thread jobs and 1 N-thread job on N CPUs
- client: change file transfer giveup time from 14 to 90 days

svn path=/trunk/boinc/; revision=18845
This commit is contained in:
David Anderson 2009-08-14 19:00:29 +00:00
parent 160ec8daec
commit 7bca6c021b
3 changed files with 39 additions and 1 deletions

View File

@ -6899,3 +6899,13 @@ David 14 Aug 2009
client/
work_fetch.cpp
David 14 Aug 2009
- client: in the final stage of CPU scheduling,
give preference to multi-threaded jobs.
Avoid running N-1 1-thread jobs and 1 N-thread job on N CPUs
- client: change file transfer giveup time from 14 to 90 days
client/
cpu_sched.cpp
pers_file_xfer.h

View File

@ -738,16 +738,44 @@ static inline bool in_ordered_scheduled_results(ACTIVE_TASK* atp) {
// return true if r0 is more important to run than r1
//
static inline bool more_important(RESULT* r0, RESULT* r1) {
// favor jobs in danger of deadline miss
//
bool miss0 = r0->rr_sim_misses_deadline;
bool miss1 = r1->rr_sim_misses_deadline;
if (miss0 && !miss1) return true;
if (!miss0 && miss1) return false;
// favor coproc jobs, so that if we're RAM-limited
// we'll use the GPU instead of the CPU
//
bool cp0 = r0->uses_coprocs();
bool cp1 = r1->uses_coprocs();
if (cp0 && !cp1) return true;
if (!cp0 && cp1) return false;
// favor multithreaded jobs over single-threaded,
// even if the latter haven't finished time slice.
// avoid the situation where we run N-1 ST jobs and 1 MT job on N CPUs
//
bool mt0 = (r0->avp->avg_ncpus > 1);
bool mt1 = (r1->avp->avg_ncpus > 1);
if (mt0 && !mt1) return true;
if (!mt0 && mt1) return false;
// favor jobs in the middle of time slice
//
bool unfin0 = r0->unfinished_time_slice;
bool unfin1 = r1->unfinished_time_slice;
if (unfin0 && !unfin1) return true;
if (!unfin0 && unfin1) return false;
// favor jobs selected first by schedule_cpus()
// (e.g., because their project has high debt)
//
if (r0->seqno < r1->seqno) return true;
if (r0->seqno > r1->seqno) return false;
// tie breaker
return (r0 < r1);
}

View File

@ -24,7 +24,7 @@
// Default values for exponential backoff
#define PERS_RETRY_DELAY_MIN 60 // 1 minute
#define PERS_RETRY_DELAY_MAX (60*60*4) // 4 hours
#define PERS_GIVEUP (60*60*24*7*2) // 2 weeks
#define PERS_GIVEUP (SECONDS_PER_DAY*90)
// give up on xfer if this time elapses since last byte xferred
/// PERS_FILE_XFER represents a "persistent file transfer",