Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Issue 2761993004: Revert of Ensure consistent return ordering in base::WaitableEvent::WaitMany (Closed)

Created:
3 years, 9 months ago by BigBossZhiling
Modified:
3 years, 9 months ago
CC:
chromium-reviews, vmpstr+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Revert of Ensure consistent return ordering in base::WaitableEvent::WaitMany (patchset #5 id:80001 of https://codereview.chromium.org/2758853002/ ) Reason for revert: Causing extra time for chrome_public_test_apk, telemetry_perf_unittests etc. Original issue's description: > Ensure consistent return ordering in base::WaitableEvent::WaitMany > > The Windows implementation (via WaitForMultipleObjects) guarantees that > if multiple objects are signaled, the one with the smallest index is > returned on wakeup. This is a useful guarantee to make, as callers are > granted the ability to rotate objects as needed to avoid potential > starvation of lower-frequency events. > > The POSIX implementation of WaitMany does not support this behavior, as > precedence is determined exclusively by WaitableEvent address order > rather than input array order. The behavior today is a result of the > implementation detail that we must lock the WaitableEvent kernels in a > globally consistent order, and this makes it effectively impossible for > a caller to control signaling priority. > > This CL changes the POSIX implementation to guarantee the same return > behavior as the Windows implementation, allowing the WaitMany API to in > turn guarantee left-to-right precedence of the WaitableEvents with which > it's called. > > This has some minor additional cost as we no longer short-circuit on the > first signaled event we find, and we always have to iterate over the array > twice now. This cost is negligible in practice as WaitMany is only ever > used in production with a small (n < 5) number of events. > > BUG=698460 > > Review-Url: https://codereview.chromium.org/2758853002 > Cr-Commit-Position: refs/heads/master@{#457967} > Committed: https://chromium.googlesource.com/chromium/src/+/926b72bf8aba665d906fe411a11a9f587335c1bb TBR=dcheng@chromium.org,rockot@chromium.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=698460 Review-Url: https://codereview.chromium.org/2761993004 Cr-Commit-Position: refs/heads/master@{#458602} Committed: https://chromium.googlesource.com/chromium/src/+/a0a9840a39b61caca179486dcf20927fe99ad4a6

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -82 lines) Patch
M base/synchronization/waitable_event.h View 1 chunk +0 lines, -3 lines 0 comments Download
M base/synchronization/waitable_event_posix.cc View 3 chunks +30 lines, -41 lines 0 comments Download
M base/synchronization/waitable_event_unittest.cc View 2 chunks +0 lines, -38 lines 0 comments Download

Messages

Total messages: 14 (5 generated)
BigBossZhiling
Created Revert of Ensure consistent return ordering in base::WaitableEvent::WaitMany
3 years, 9 months ago (2017-03-21 22:06:23 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2761993004/1
3 years, 9 months ago (2017-03-21 22:06:47 UTC) #3
BigBossZhiling
3 years, 9 months ago (2017-03-21 22:06:48 UTC) #5
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. CQ run can only be started once the ...
3 years, 9 months ago (2017-03-21 22:06:49 UTC) #6
Ken Rockot(use gerrit already)
LGTM to experimentally determine whether this is actually having a performence impact on telemetry
3 years, 9 months ago (2017-03-21 22:07:23 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2761993004/1
3 years, 9 months ago (2017-03-21 22:09:14 UTC) #9
dcheng
lgtm
3 years, 9 months ago (2017-03-21 23:02:26 UTC) #10
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://chromium.googlesource.com/chromium/src/+/a0a9840a39b61caca179486dcf20927fe99ad4a6
3 years, 9 months ago (2017-03-21 23:26:46 UTC) #13
Ken Rockot(use gerrit already)
3 years, 9 months ago (2017-03-22 19:33:42 UTC) #14
Message was sent while issue was closed.
A revert of this CL (patchset #1 id:1) has been created in
https://codereview.chromium.org/2773463002/ by rockot@chromium.org.

The reason for reverting is: Even if this did negatively impact telemetry
performance, we'd want the WaitMany change for the sake of API correctness.

However, after leaving the revert in place for a day, it doesn't look like this
CL was the culprit anyway..

Powered by Google App Engine
This is Rietveld 408576698