- client: clear resource backoffs on user-requested RPC

- client: randomize resource backoffs to avoid lockstep

svn path=/trunk/boinc/; revision=17664
This commit is contained in:
David Anderson 2009-03-26 16:56:20 +00:00
parent 2a251d4daf
commit 3e04801942
3 changed files with 26 additions and 14 deletions

View File

@ -3363,15 +3363,15 @@ Charlie 25 Mar 2009
gui_rpc_client.h
Charlie 26 Mar 2009
- Mac: revise XCode project to use OS 10.4 SDK for building PowerPC libraries
and executables so that we can use weak-linking for APIs not available
before OS 10.4, such as uselocale().
- MGR: Modify SET_LOCALE constructor and destructor to change locale only on
those systems without support for setting locale on a per-thread basis,
such as OS 10.3.9.
NOTE: At this point it appears that Ubuntu and Fedora both support uselocale().
If any platform does not support it, change the "#if 0" gui_rpc_client.h
to "#if defined(some_OS)".
- Mac: revise XCode project to use OS 10.4 SDK for building PowerPC
libraries and executables so that we can use weak-linking for
APIs not available before OS 10.4, such as uselocale().
- MGR: Modify SET_LOCALE constructor and destructor to change locale
only on those systems without support for setting locale
on a per-thread basis, such as OS 10.3.9.
NOTE: At this point it appears that Ubuntu and Fedora both support
uselocale(). If any platform does not support it,
change the "#if 0" gui_rpc_client.h to "#if defined(some_OS)".
clientgui/
AsyncRPC.cpp
@ -3380,3 +3380,11 @@ Charlie 26 Mar 2009
mac_build/
boinc.xcodeproj/
project.pbxproj
David 26 Mar 2009
- client: clear resource backoffs on user-requested RPC
- client: randomize resource backoffs to avoid lockstep
client/
cs_scheduler.cpp
work_fetch.cpp

View File

@ -362,11 +362,12 @@ bool CLIENT_STATE::scheduler_rpc_poll() {
//
p = next_project_sched_rpc_pending();
if (p) {
// if the user requested the RPC, clear backoffs to allow work requests
// if the user requested the RPC,
// clear backoffs to allow work requests
//
if (p->sched_rpc_pending == RPC_REASON_USER_REQ) {
p->cpu_pwf.backoff_time = 0;
p->cuda_pwf.backoff_time = 0;
p->cpu_pwf.clear_backoff();
p->cuda_pwf.clear_backoff();
}
work_fetch.compute_work_request(p);
scheduler_op->init_op_project(p, p->sched_rpc_pending);

View File

@ -15,6 +15,8 @@
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
#include "util.h"
#include "client_types.h"
#include "client_msgs.h"
#ifdef SIM
@ -743,10 +745,11 @@ void RSC_PROJECT_WORK_FETCH::backoff(PROJECT* p, char* name) {
} else {
backoff_interval = MIN_BACKOFF_INTERVAL;
}
backoff_time = gstate.now + backoff_interval;
double x = drand()*backoff_interval;
backoff_time = gstate.now + x;
if (log_flags.work_fetch_debug) {
msg_printf(p, MSG_INFO,
"[wfd] backing off %s %.0f sec", name, backoff_interval
"[wfd] backing off %s %.0f sec", name, x
);
}
}