mirror of https://github.com/BOINC/boinc.git
- scheduler: don't send jobs for "hard apps" (weight==-1)
to hosts with total_credit=0 - client: add a buffer size check svn path=/trunk/boinc/; revision=15809
This commit is contained in:
parent
0838f5cf43
commit
6337181571
|
@ -6423,3 +6423,14 @@ David 12 Aug 2008
|
|||
forum_index.php
|
||||
team_members.php
|
||||
white.css
|
||||
|
||||
David 12 Aug 2008
|
||||
- scheduler: don't send jobs for "hard apps" (weight==-1)
|
||||
to hosts with total_credit=0
|
||||
- client: add a buffer size check
|
||||
|
||||
client/
|
||||
client_msgs.C
|
||||
main.C
|
||||
sched/
|
||||
sched_send.C
|
||||
|
|
|
@ -32,7 +32,7 @@ using std::deque;
|
|||
|
||||
#define MAX_SAVED_MESSAGES 1000
|
||||
|
||||
// a dequeue of up to MAX_SAVED_MESSAGES most recent messages,
|
||||
// a cache of MAX_SAVED_MESSAGES most recent messages,
|
||||
// stored in newest-first order
|
||||
//
|
||||
deque<MESSAGE_DESC*> message_descs;
|
||||
|
@ -47,21 +47,24 @@ void msg_printf(PROJECT *p, int priority, const char *fmt, ...) {
|
|||
|
||||
if (fmt == NULL) return;
|
||||
|
||||
va_start(ap, fmt); // Parses string for variables
|
||||
vsprintf(buf, fmt, ap); // And convert symbols To actual numbers
|
||||
va_end(ap); // Results are stored in text
|
||||
va_start(ap, fmt);
|
||||
vsnprintf(buf, sizeof(buf), fmt, ap);
|
||||
buf[sizeof(buf)-1] = 0;
|
||||
va_end(ap);
|
||||
|
||||
show_message(p, buf, priority);
|
||||
}
|
||||
|
||||
// stash message in memory
|
||||
// add message to cache, and delete old messages if cache too big
|
||||
//
|
||||
void record_message(PROJECT* p, int priority, int now, char* message) {
|
||||
MESSAGE_DESC* mdp = new MESSAGE_DESC;
|
||||
static int seqno = 1;
|
||||
strcpy(mdp->project_name, "");
|
||||
if (p) {
|
||||
strcpy(mdp->project_name, p->get_project_name());
|
||||
strlcpy(
|
||||
mdp->project_name, sizeof(mdp->project_name), p->get_project_name()
|
||||
);
|
||||
}
|
||||
mdp->priority = priority;
|
||||
mdp->timestamp = now;
|
||||
|
|
|
@ -108,6 +108,9 @@ void show_message(PROJECT *p, char* msg, int priority) {
|
|||
} else {
|
||||
strlcpy(message, msg, sizeof(message));
|
||||
}
|
||||
|
||||
// trim trailing \n's
|
||||
//
|
||||
while (strlen(message)&&message[strlen(message)-1] == '\n') {
|
||||
message[strlen(message)-1] = 0;
|
||||
}
|
||||
|
|
|
@ -567,10 +567,17 @@ static inline int check_deadline(
|
|||
if (config.ignore_delay_bound) return 0;
|
||||
|
||||
// skip delay check if host currently doesn't have any work
|
||||
// and it's not a hard app.
|
||||
// (i.e. everyone gets one result, no matter how slow they are)
|
||||
//
|
||||
if (request.estimated_delay == 0 && !hard_app(app)) return 0;
|
||||
|
||||
// if it's a hard app, don't send it to a host with no credit
|
||||
//
|
||||
if (hard_app(app) && reply.host.total_credit == 0) {
|
||||
return INFEASIBLE_CPU;
|
||||
}
|
||||
|
||||
double ewd = estimate_wallclock_duration(wu, request, reply);
|
||||
if (hard_app(app)) ewd *= 1.3;
|
||||
double est_completion_delay = request.estimated_delay + ewd;
|
||||
|
|
Loading…
Reference in New Issue