mirror of https://github.com/BOINC/boinc.git
Merge pull request #3703 from BOINC/dpa_gpu_susp
client: avoid CPU starvation when GPU computing is suspended
This commit is contained in:
commit
3ab211a922
|
@ -97,10 +97,17 @@ struct RR_SIM {
|
||||||
inline void activate(RESULT* rp) {
|
inline void activate(RESULT* rp) {
|
||||||
PROJECT* p = rp->project;
|
PROJECT* p = rp->project;
|
||||||
active.push_back(rp);
|
active.push_back(rp);
|
||||||
rsc_work_fetch[0].sim_nused += rp->avp->avg_ncpus;
|
|
||||||
p->rsc_pwf[0].sim_nused += rp->avp->avg_ncpus;
|
|
||||||
|
|
||||||
int rt = rp->avp->gpu_usage.rsc_type;
|
int rt = rp->avp->gpu_usage.rsc_type;
|
||||||
|
|
||||||
|
// if this is a GPU app and GPU computing is suspended,
|
||||||
|
// don't count its CPU usage.
|
||||||
|
// That way we'll fetch more CPU work if needed.
|
||||||
|
//
|
||||||
|
if (!rt || !gpu_suspend_reason) {
|
||||||
|
rsc_work_fetch[0].sim_nused += rp->avp->avg_ncpus;
|
||||||
|
p->rsc_pwf[0].sim_nused += rp->avp->avg_ncpus;
|
||||||
|
}
|
||||||
|
|
||||||
if (rt) {
|
if (rt) {
|
||||||
rsc_work_fetch[rt].sim_nused += rp->avp->gpu_usage.usage;
|
rsc_work_fetch[rt].sim_nused += rp->avp->gpu_usage.usage;
|
||||||
p->rsc_pwf[rt].sim_nused += rp->avp->gpu_usage.usage;
|
p->rsc_pwf[rt].sim_nused += rp->avp->gpu_usage.usage;
|
||||||
|
|
Loading…
Reference in New Issue