Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c7969ae6 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix job preemption logic"

parents d5cbd092 765c9bc2
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -372,9 +372,10 @@ class JobConcurrencyManager {
                    continue;
                }

                // TODO lastEvaluatedPriority should be evaluateJobPriorityLocked. (double check it)
                if (minPriorityForPreemption > nextPending.lastEvaluatedPriority) {
                    minPriorityForPreemption = nextPending.lastEvaluatedPriority;
                if (minPriorityForPreemption > jobPriority) {
                    // Step down the preemption threshold - wind up replacing
                    // the lowest-priority running job
                    minPriorityForPreemption = jobPriority;
                    selectedContextId = j;
                    // In this case, we're just going to preempt a low priority job, we're not
                    // actually starting a job, so don't set startingJob.