mirror of https://github.com/BOINC/boinc.git
- scheduler: when HR is being used,
make per-HR slot allocation an option rather than the default. Kevin reported that slot allocation wasn't working for WCG. The default is now no slot allocation, and use the regular result enumeration function rather than the once that scans the entire table. The config flag for enabling slot allocation is <hr_allocate_slots/>. svn path=/trunk/boinc/; revision=25432
This commit is contained in:
parent
d0847d098b
commit
73474ac408
|
@ -2681,8 +2681,23 @@ David 14 Mar 2012
|
|||
|
||||
David 15 Mar 2012
|
||||
- client: when killing a task, don't delete its shmem or change its state.
|
||||
These mess up the logic for dealing with exited processes.
|
||||
These mess up the logic for dealing with exited processes,
|
||||
resulting in incorrect log messages.
|
||||
|
||||
client/
|
||||
app.cpp
|
||||
app_control.cpp
|
||||
|
||||
David 15 Mar 2012
|
||||
- scheduler: when HR is being used,
|
||||
make per-HR slot allocation an option rather than the default.
|
||||
Kevin reported that slot allocation wasn't working for WCG.
|
||||
The default is now no slot allocation,
|
||||
and use the regular result enumeration function
|
||||
rather than the once that scans the entire table.
|
||||
The config flag for enabling slot allocation is <hr_allocate_slots/>.
|
||||
|
||||
sched/
|
||||
sched_config.cpp,h
|
||||
feeder.cpp
|
||||
hr_info.cpp
|
||||
|
|
|
@ -252,7 +252,7 @@ static bool get_job_from_db(
|
|||
int hrt = ssp->apps[app_index].homogeneous_redundancy;
|
||||
|
||||
while (1) {
|
||||
if (hrt) {
|
||||
if (hrt && config.hr_allocate_slots) {
|
||||
retval = wi.enumerate_all(enum_size, select_clause);
|
||||
} else {
|
||||
retval = wi.enumerate(enum_size, select_clause, order_clause);
|
||||
|
@ -326,7 +326,7 @@ static bool get_job_from_db(
|
|||
|
||||
// if using HR, check whether we've exceeded quota for this class
|
||||
//
|
||||
if (hrt) {
|
||||
if (hrt && config.hr_allocate_slots) {
|
||||
if (!hr_info.accept(hrt, wi.wu.hr_class)) {
|
||||
log_messages.printf(MSG_DEBUG,
|
||||
"rejecting [RESULT#%u] because HR class %d/%d over quota\n",
|
||||
|
@ -420,7 +420,7 @@ static bool scan_work_array(vector<DB_WORK_ITEM> &work_items) {
|
|||
}
|
||||
}
|
||||
|
||||
if (using_hr) {
|
||||
if (using_hr && config.hr_allocate_slots) {
|
||||
hr_count_slots();
|
||||
}
|
||||
|
||||
|
@ -616,34 +616,38 @@ void hr_init() {
|
|||
}
|
||||
}
|
||||
using_hr = true;
|
||||
hr_info.init();
|
||||
retval = hr_info.read_file();
|
||||
if (retval) {
|
||||
log_messages.printf(MSG_CRITICAL,
|
||||
"Can't read HR info file: %s\n", boincerror(retval)
|
||||
);
|
||||
exit(1);
|
||||
}
|
||||
if (config.hr_allocate_slots) {
|
||||
hr_info.init();
|
||||
retval = hr_info.read_file();
|
||||
if (retval) {
|
||||
log_messages.printf(MSG_CRITICAL,
|
||||
"Can't read HR info file: %s\n", boincerror(retval)
|
||||
);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// find the weight for each HR type
|
||||
//
|
||||
for (i=0; i<ssp->napps; i++) {
|
||||
hrt = ssp->apps[i].homogeneous_redundancy;
|
||||
hr_info.type_weights[hrt] += ssp->apps[i].weight;
|
||||
hr_info.type_being_used[hrt] = true;
|
||||
}
|
||||
// find the weight for each HR type
|
||||
//
|
||||
for (i=0; i<ssp->napps; i++) {
|
||||
hrt = ssp->apps[i].homogeneous_redundancy;
|
||||
hr_info.type_weights[hrt] += ssp->apps[i].weight;
|
||||
hr_info.type_being_used[hrt] = true;
|
||||
}
|
||||
|
||||
// compute the slot allocations for HR classes
|
||||
//
|
||||
hr_info.allocate(ssp->max_wu_results);
|
||||
hr_info.show(stderr);
|
||||
// compute the slot allocations for HR classes
|
||||
//
|
||||
hr_info.allocate(ssp->max_wu_results);
|
||||
hr_info.show(stderr);
|
||||
}
|
||||
}
|
||||
|
||||
// write a summary of feeder state to stderr
|
||||
//
|
||||
void show_state(int) {
|
||||
ssp->show(stderr);
|
||||
hr_info.show(stderr);
|
||||
if (config.hr_allocate_slots) {
|
||||
hr_info.show(stderr);
|
||||
}
|
||||
}
|
||||
|
||||
void show_version() {
|
||||
|
|
|
@ -175,7 +175,7 @@ void HR_INFO::allocate(int total_slots) {
|
|||
}
|
||||
|
||||
// Decide if job of the given HR type and class should be added to array,
|
||||
// and if to update counts
|
||||
// and if so update counts
|
||||
//
|
||||
bool HR_INFO::accept(int hrt, int hrc) {
|
||||
if (cur_slots[hrt][hrc] >= max_slots[hrt][hrc]) {
|
||||
|
|
|
@ -141,6 +141,7 @@ int SCHED_CONFIG::parse(FILE* f) {
|
|||
if (xp.parse_bool("non_cpu_intensive", non_cpu_intensive)) continue;
|
||||
if (xp.parse_bool("verify_files_on_app_start", verify_files_on_app_start)) continue;
|
||||
if (xp.parse_int("homogeneous_redundancy", homogeneous_redundancy)) continue;
|
||||
if (xp.parse_bool("hr_allocate_slots", hr_allocate_slots)) continue;
|
||||
if (xp.parse_bool("msg_to_host", msg_to_host)) continue;
|
||||
if (xp.parse_bool("ignore_upload_certificates", ignore_upload_certificates)) continue;
|
||||
if (xp.parse_bool("dont_generate_upload_certificates", dont_generate_upload_certificates)) continue;
|
||||
|
|
|
@ -66,6 +66,7 @@ struct SCHED_CONFIG {
|
|||
bool non_cpu_intensive;
|
||||
bool verify_files_on_app_start;
|
||||
int homogeneous_redundancy;
|
||||
bool hr_allocate_slots;
|
||||
bool ignore_upload_certificates;
|
||||
bool dont_generate_upload_certificates;
|
||||
int uldl_dir_fanout; // fanout of ul/dl dirs; 0 if none
|
||||
|
|
Loading…
Reference in New Issue