mirror of https://github.com/BOINC/boinc.git
scheduler:
fix sending 'old' work in locality scheduler - leave locality scheduler only if there is no more work needed after sending 'old' work, in particular DON'T leave if old work for possibly non-locality apps couldn't be sent - try to send 'old' work before doing anything else
This commit is contained in:
parent
5ccdfa7e5a
commit
c61c28acef
|
@ -1169,6 +1169,16 @@ void send_work_locality() {
|
|||
);
|
||||
}
|
||||
|
||||
// send old work if there is any. send this only to hosts which have
|
||||
// high-bandwidth connections, since asking dial-up users to upload
|
||||
// (presumably large) data files is onerous.
|
||||
//
|
||||
if (config.locality_scheduling_send_timeout && g_request->host.n_bwdown>100000) {
|
||||
int until=time(0)-config.locality_scheduling_send_timeout;
|
||||
int retval_sow=send_old_work(INT_MIN, until);
|
||||
if (!work_needed(true)) return;
|
||||
}
|
||||
|
||||
// Look for work in order of increasing file name, or randomly?
|
||||
//
|
||||
if (config.locality_scheduling_sorted_order) {
|
||||
|
@ -1179,16 +1189,6 @@ void send_work_locality() {
|
|||
j = rand()%nfiles;
|
||||
}
|
||||
|
||||
// send old work if there is any. send this only to hosts which have
|
||||
// high-bandwidth connections, since asking dial-up users to upload
|
||||
// (presumably large) data files is onerous.
|
||||
//
|
||||
if (config.locality_scheduling_send_timeout && g_request->host.n_bwdown>100000) {
|
||||
int until=time(0)-config.locality_scheduling_send_timeout;
|
||||
int retval_sow=send_old_work(INT_MIN, until);
|
||||
if (retval_sow==ERR_NO_APP_VERSION || retval_sow==ERR_INSUFFICIENT_RESOURCE) return;
|
||||
}
|
||||
|
||||
// send work for existing files
|
||||
//
|
||||
for (i=0; i<(int)g_request->file_infos.size(); i++) {
|
||||
|
|
Loading…
Reference in New Issue