mirror of https://github.com/BOINC/boinc.git
- scheduler: add locality_scheduling arg to add_result_to_reply();
eliminate the need to diddle around with config.locality_scheduling. svn path=/trunk/boinc/; revision=17445
This commit is contained in:
parent
2bf1427dce
commit
33d5a81cf6
|
@ -2534,3 +2534,14 @@ Charlie 3 Mar 2009
|
|||
mac_saver_module.cpp
|
||||
screensaver.cpp, .h
|
||||
screensaver_win.cpp
|
||||
|
||||
David 3 Mar 2009
|
||||
- scheduler: add locality_scheduling arg to add_result_to_reply();
|
||||
eliminate the need to diddle around with config.locality_scheduling.
|
||||
|
||||
sched/
|
||||
sched_array.cpp
|
||||
sched_assign.cpp
|
||||
sched_locality.cpp
|
||||
sched_resend.cpp
|
||||
sched_send.cpp,h
|
||||
|
|
|
@ -277,7 +277,7 @@ void scan_work_array() {
|
|||
goto done;
|
||||
}
|
||||
|
||||
retval = add_result_to_reply(result, wu, bavp);
|
||||
retval = add_result_to_reply(result, wu, bavp, false);
|
||||
|
||||
// add_result_to_reply() fails only in fairly pathological cases -
|
||||
// e.g. we couldn't update the DB record or modify XML fields.
|
||||
|
|
|
@ -84,7 +84,7 @@ static int send_assigned_job(ASSIGNMENT& asg) {
|
|||
int result_id = boinc_db.insert_id();
|
||||
DB_RESULT result;
|
||||
retval = result.lookup_id(result_id);
|
||||
add_result_to_reply(result, wu, bavp);
|
||||
add_result_to_reply(result, wu, bavp, false);
|
||||
|
||||
// if this is a one-job assignment, fill in assignment.resultid
|
||||
// so that it doesn't get sent again
|
||||
|
|
|
@ -297,7 +297,7 @@ static int possibly_send_result(DB_RESULT& result) {
|
|||
if (count > 0) return ERR_WU_USER_RULE;
|
||||
}
|
||||
|
||||
return add_result_to_reply(result, wu, bavp);
|
||||
return add_result_to_reply(result, wu, bavp, true);
|
||||
}
|
||||
|
||||
// returns true if the work generator can not make more work for this
|
||||
|
|
|
@ -188,7 +188,7 @@ bool resend_lost_work() {
|
|||
);
|
||||
g_reply->insert_message(USER_MESSAGE(warning_msg, "high"));
|
||||
} else {
|
||||
retval = add_result_to_reply(result, wu, bavp);
|
||||
retval = add_result_to_reply(result, wu, bavp, false);
|
||||
if (retval) {
|
||||
log_messages.printf(MSG_CRITICAL,
|
||||
"[HOST#%d] failed to send [RESULT#%d]\n",
|
||||
|
|
|
@ -1081,7 +1081,10 @@ bool work_needed(bool locality_sched) {
|
|||
return false;
|
||||
}
|
||||
|
||||
int add_result_to_reply(DB_RESULT& result, WORKUNIT& wu, BEST_APP_VERSION* bavp) {
|
||||
int add_result_to_reply(
|
||||
DB_RESULT& result, WORKUNIT& wu, BEST_APP_VERSION* bavp,
|
||||
bool locality_scheduling
|
||||
) {
|
||||
int retval;
|
||||
bool resent_result = false;
|
||||
APP* app = ssp->lookup_app(wu.appid);
|
||||
|
@ -1093,9 +1096,7 @@ int add_result_to_reply(DB_RESULT& result, WORKUNIT& wu, BEST_APP_VERSION* bavp)
|
|||
// reduce the available space by LESS than the workunit rsc_disk_bound,
|
||||
// IF the host already has the file OR the file was not already sent.
|
||||
//
|
||||
if (!config.locality_scheduling ||
|
||||
decrement_disk_space_locality(wu)
|
||||
) {
|
||||
if (!locality_scheduling || decrement_disk_space_locality(wu)) {
|
||||
g_wreq->disk_available -= wu.rsc_disk_bound;
|
||||
}
|
||||
|
||||
|
@ -2020,7 +2021,7 @@ void JOB_SET::send() {
|
|||
result.id = wu_result.resultid;
|
||||
retval = read_sendable_result(result);
|
||||
if (!retval) {
|
||||
add_result_to_reply(result, wu, job.bavp);
|
||||
add_result_to_reply(result, wu, job.bavp, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,8 @@
|
|||
extern void send_work();
|
||||
|
||||
extern int add_result_to_reply(
|
||||
DB_RESULT& result, WORKUNIT& wu, BEST_APP_VERSION* bavp
|
||||
DB_RESULT& result, WORKUNIT& wu, BEST_APP_VERSION* bavp,
|
||||
bool locality_scheduling
|
||||
);
|
||||
|
||||
inline bool anonymous(PLATFORM* platform) {
|
||||
|
|
Loading…
Reference in New Issue