From e34c09c000b2ad19b39ab9ffe4ffa25519e27954 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 28 Sep 2010 21:48:31 +0000 Subject: [PATCH] - client: if we suspend apps because non-BOINC CPU is is too high, leave them in memory. Otherwise (if the CPU use is caused by launching an app, say by security software) we would get into a loop. svn path=/trunk/boinc/; revision=22420 --- checkin_notes | 36 ++++++++++++++++++++++-------------- client/app_control.cpp | 9 ++++++++- 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/checkin_notes b/checkin_notes index 455579a0e4..11b4449866 100644 --- a/checkin_notes +++ b/checkin_notes @@ -6847,19 +6847,6 @@ David 27 Sept 2010 cs_statefile.cpp scheduler_op.cpp time_stats.cpp -<<<<<<< .mine - -David 28 Sept 2010 - - validator: if credit calculation returns an error, - wait 6 hours before retrying - - sched/ - validator.cpp - client/ - sim.cpp,h - client_state.h - cs_statefile.cpp -======= Rom 28 Sept 2010 - MGR: Make the new BOINC skin the default skin. @@ -6883,4 +6870,25 @@ Rom 28 Sept 2010 / configure.ac version.h ->>>>>>> .r22417 + +David 28 Sept 2010 + - validator: if credit calculation returns an error, + wait 6 hours before retrying + + sched/ + validator.cpp + client/ + sim.cpp,h + client_state.h + cs_statefile.cpp + + +David 28 Sept 2010 + - client: if we suspend apps because non-BOINC CPU is is too high, + leave them in memory. + Otherwise (if the CPU use is caused by launching an app, + say by security software) + we would get into a loop. + + client/ + app_control.cpp diff --git a/client/app_control.cpp b/client/app_control.cpp index 5f9c424eab..eba97e9965 100644 --- a/client/app_control.cpp +++ b/client/app_control.cpp @@ -898,8 +898,15 @@ void ACTIVE_TASK_SET::suspend_all(int reason) { atp->preempt(REMOVE_NEVER); break; case SUSPEND_REASON_CPU_USAGE: + // If we're suspending because of non-BOINC CPU load, + // don't remove from memory. + // Some systems do a security check when apps are launched, + // which uses a lot of CPU. + // Avoid going into a preemption loop. + // if (atp->result->project->non_cpu_intensive) break; - // fall through + atp->preempt(REMOVE_NEVER); + break; default: atp->preempt(REMOVE_MAYBE_USER); }