diff --git a/checkin_notes b/checkin_notes
index a8b2e4e5db..d4e9e01adc 100644
--- a/checkin_notes
+++ b/checkin_notes
@@ -3999,3 +3999,17 @@ David 10 July 2011
lib/
gui_rpc_client_ops.cpp
+
+David 10 July 2011
+ - Manager and GUI RPC:
+ Remove debt fields from PROJECT: not used anymore
+ Add sched_priority field
+
+ lib/
+ gui_rpc_client_ops.cpp
+ gui_rpc_client.h
+ client/
+ client_state.cpp
+ client_types.cpp
+ clientgui/
+ DlgItemProperties.cpp
diff --git a/client/client_state.cpp b/client/client_state.cpp
index 6e1d82f7a3..2773cf8a80 100644
--- a/client/client_state.cpp
+++ b/client/client_state.cpp
@@ -632,6 +632,8 @@ int CLIENT_STATE::init() {
//
init_exclude_gpu();
+ project_priority_init();
+
initialized = true;
return 0;
}
diff --git a/client/client_types.cpp b/client/client_types.cpp
index 40e17f8ccf..a1b5336f82 100644
--- a/client/client_types.cpp
+++ b/client/client_types.cpp
@@ -388,6 +388,7 @@ int PROJECT::write_state(MIOFILE& out, bool gui_rpc) {
" %d\n"
" %d\n"
" %d\n"
+ " %f\n"
"%s%s%s%s%s%s%s%s%s%s%s%s%s",
master_url,
project_name,
@@ -421,6 +422,7 @@ int PROJECT::write_state(MIOFILE& out, bool gui_rpc) {
sched_rpc_pending,
send_time_stats_log,
send_job_log,
+ project_priority(this),
anonymous_platform?" \n":"",
master_url_fetch_pending?" \n":"",
trickle_up_pending?" \n":"",
diff --git a/clientgui/DlgItemProperties.cpp b/clientgui/DlgItemProperties.cpp
index 0d329bde75..33a62945b9 100644
--- a/clientgui/DlgItemProperties.cpp
+++ b/clientgui/DlgItemProperties.cpp
@@ -260,8 +260,7 @@ void CDlgItemProperties::renderInfos(PROJECT* project_in) {
if (project->no_cpu_pref) {
addProperty(_("Project preference"), _("Don't fetch CPU tasks"));
}
- addProperty(_("CPU scheduling priority"),wxString::Format(wxT("%0.2f"), project->cpu_short_term_debt));
- addProperty(_("CPU work fetch priority"),wxString::Format(wxT("%0.2f"), project->cpu_long_term_debt));
+ addProperty(_("Scheduling priority"),wxString::Format(wxT("%0.2f"), project->sched_priority));
double x = project->cpu_backoff_time - dtime();
if (x<0) x = 0;
addProperty(_("CPU work fetch deferred for"), FormatTime(x));
@@ -270,8 +269,6 @@ void CDlgItemProperties::renderInfos(PROJECT* project_in) {
if (project->no_cuda_pref) {
addProperty(_("Project preference"), _("Don't fetch NVIDIA GPU tasks"));
}
- addProperty(_("NVIDIA GPU scheduling priority"),wxString::Format(wxT("%0.2f"), project->cuda_short_term_debt));
- addProperty(_("NVIDIA GPU work fetch priority"),wxString::Format(wxT("%0.2f"), project->cuda_debt));
x = project->cuda_backoff_time - dtime();
if (x<0) x = 0;
addProperty(_("NVIDIA GPU work fetch deferred for"), FormatTime(x));
@@ -281,8 +278,6 @@ void CDlgItemProperties::renderInfos(PROJECT* project_in) {
if (project->no_ati_pref) {
addProperty(_("Project preference"), _("Don't fetch ATI GPU tasks"));
}
- addProperty(_("ATI GPU scheduling priority"),wxString::Format(wxT("%0.2f"), project->ati_short_term_debt));
- addProperty(_("ATI GPU work fetch priority"),wxString::Format(wxT("%0.2f"), project->ati_debt));
x = project->ati_backoff_time - dtime();
if (x<0) x = 0;
addProperty(_("ATI GPU work fetch deferred for"), FormatTime(x));
diff --git a/lib/gui_rpc_client.h b/lib/gui_rpc_client.h
index 61b3a0b639..1b20b77cc9 100644
--- a/lib/gui_rpc_client.h
+++ b/lib/gui_rpc_client.h
@@ -125,16 +125,12 @@ public:
double download_backoff;
double upload_backoff;
- double cpu_short_term_debt;
- double cpu_long_term_debt;
+ double sched_priority;
+
double cpu_backoff_time;
double cpu_backoff_interval;
- double cuda_debt;
- double cuda_short_term_debt;
double cuda_backoff_time;
double cuda_backoff_interval;
- double ati_debt;
- double ati_short_term_debt;
double ati_backoff_time;
double ati_backoff_interval;
double duration_correction_factor;
diff --git a/lib/gui_rpc_client_ops.cpp b/lib/gui_rpc_client_ops.cpp
index f659789a85..3d83ac67f7 100644
--- a/lib/gui_rpc_client_ops.cpp
+++ b/lib/gui_rpc_client_ops.cpp
@@ -256,16 +256,11 @@ int PROJECT::parse(MIOFILE& in) {
if (parse_double(buf, "", min_rpc_time)) continue;
if (parse_double(buf, "", download_backoff)) continue;
if (parse_double(buf, "", upload_backoff)) continue;
- if (parse_double(buf, "", cpu_short_term_debt)) continue;
- if (parse_double(buf, "", cpu_long_term_debt)) continue;
+ if (parse_double(buf, "", sched_priority)) continue;
if (parse_double(buf, "", cpu_backoff_time)) continue;
if (parse_double(buf, "", cpu_backoff_interval)) continue;
- if (parse_double(buf, "", cuda_debt)) continue;
- if (parse_double(buf, "", cuda_short_term_debt)) continue;
if (parse_double(buf, "", cuda_backoff_time)) continue;
if (parse_double(buf, "", cuda_backoff_interval)) continue;
- if (parse_double(buf, "", ati_debt)) continue;
- if (parse_double(buf, "", ati_short_term_debt)) continue;
if (parse_double(buf, "", ati_backoff_time)) continue;
if (parse_double(buf, "", ati_backoff_interval)) continue;
if (parse_double(buf, "", duration_correction_factor)) continue;
@@ -319,14 +314,10 @@ void PROJECT::clear() {
min_rpc_time = 0;
download_backoff = 0;
upload_backoff = 0;
- cpu_short_term_debt = 0;
- cpu_long_term_debt = 0;
cpu_backoff_time = 0;
cpu_backoff_interval = 0;
- cuda_debt = 0;
cuda_backoff_time = 0;
cuda_backoff_interval = 0;
- ati_debt = 0;
ati_backoff_time = 0;
ati_backoff_interval = 0;
duration_correction_factor = 0;