Commit 27cac7b3 authored by Scott Haseley's avatar Scott Haseley Committed by Commit Bot

Fix QueuePriority::kVeryHighPriority starvation score

The starvation scores for the high and very high priorities were
inverted, so very high was acting as if it was between normal and
high priority instead of high and highest.

Bug: 863341
Change-Id: I98c62cbdc859560b2883375b251c711b8dc13e1d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1634549Reviewed-by: default avatarSami Kyöstilä <skyostil@chromium.org>
Reviewed-by: default avatarAlexander Timin <altimin@chromium.org>
Commit-Queue: Scott Haseley <shaseley@chromium.org>
Cr-Commit-Position: refs/heads/master@{#664946}
parent 97c10a72
...@@ -4422,10 +4422,10 @@ TEST_P(SequenceManagerTest, TaskPriortyInterleaving) { ...@@ -4422,10 +4422,10 @@ TEST_P(SequenceManagerTest, TaskPriortyInterleaving) {
EXPECT_EQ(order, EXPECT_EQ(order,
"000000000000000000000000000000000000000000000000000000000000" "000000000000000000000000000000000000000000000000000000000000"
"111131211314121315113214131121311151324113112131114132511311" "111121311214131215112314121131211151234112113121114123511211"
"213411132115131241311121311145132111311214311253323432333233" "312411123115121341211131211145123111211314211352232423222322"
"453233323432333253432333233432353233432333233453233323422252" "452322232423222352423222322423252322423222322452322232433353"
"242222224252222422222245222224222254444445444444544444454444" "343333334353333433333345333334333354444445444444544444454444"
"445444444544444454445555555555555555555555555555555555555555" "445444444544444454445555555555555555555555555555555555555555"
"666666666666666666666666666666666666666666666666666666666666"); "666666666666666666666666666666666666666666666666666666666666");
} }
......
...@@ -93,11 +93,11 @@ class BASE_EXPORT TaskQueueSelector : public WorkQueueSets::Observer { ...@@ -93,11 +93,11 @@ class BASE_EXPORT TaskQueueSelector : public WorkQueueSets::Observer {
// Maximum score to accumulate before very high priority tasks are run even in // Maximum score to accumulate before very high priority tasks are run even in
// the presence of highest priority tasks. // the presence of highest priority tasks.
static const size_t kMaxHighPriorityStarvationScore = 3; static const size_t kMaxVeryHighPriorityStarvationScore = 3;
// Maximum score to accumulate before high priority tasks are run even in the // Maximum score to accumulate before high priority tasks are run even in the
// presence of very high priority tasks. // presence of very high priority tasks.
static const size_t kMaxVeryHighPriorityStarvationScore = 5; static const size_t kMaxHighPriorityStarvationScore = 5;
// Maximum score to accumulate before normal priority tasks are run even in // Maximum score to accumulate before normal priority tasks are run even in
// the presence of higher priority tasks i.e. highest and high priority tasks. // the presence of higher priority tasks i.e. highest and high priority tasks.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment