DescriptionRevert 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 #
Messages
Total messages: 14 (5 generated)
|