Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dispatcher: faster runOnAllThreads #7011

Merged
merged 3 commits into from
May 22, 2019
Merged

dispatcher: faster runOnAllThreads #7011

merged 3 commits into from
May 22, 2019

Conversation

lambdai
Copy link
Contributor

@lambdai lambdai commented May 20, 2019

Description:
The shared_ptr and the atomic<unit64_t> is duplicate in term of ref count.
Beside that this diff avoid cb and all_threads_complete_cb copy at O(number of worker) scale.

Theoretically the callback is passing by reference (was value copy) but I doubt anyone would rely on the previous behavior.

Signed-off-by: Yuchen Dai silentdai@gmail.com

Risk Level: LOW
Testing: existing test

Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
@lambdai
Copy link
Contributor Author

lambdai commented May 21, 2019

@htuch Do you think this is reasonable?

@htuch htuch requested a review from eziskind May 21, 2019 02:08
@htuch
Copy link
Member

htuch commented May 21, 2019

@silentdai seems like an interesting optimization. Assigning to @eziskind for a first review, since he has been spending some time recently reasoning about the GC behavior of this code.

eziskind
eziskind previously approved these changes May 21, 2019
Copy link
Contributor

@eziskind eziskind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! LGTM

Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome.

@htuch htuch merged commit ac0270c into envoyproxy:master May 22, 2019
mpuncel added a commit to mpuncel/envoy that referenced this pull request May 22, 2019
* master: (65 commits)
  proto: Add PATCH method to RequestMethod enum (envoyproxy#6737)
  exe: drop unused deps on zlib compressor code (envoyproxy#7022)
  coverage: fix some misc coverage (envoyproxy#7033)
  Enable proto schema for router_check_tool (envoyproxy#6992)
  stats: rework stat sink flushing to centralize counter latching (envoyproxy#6996)
  [test] convert lds api test config stubs to v2 (envoyproxy#7021)
  router: scoped rds (2c): implement scoped rds API (envoyproxy#6932)
  build: Add option for size-optimized binary (envoyproxy#6960)
  test: adding an integration test framework for file-based LDS (envoyproxy#6933)
  doc: update obsolete ref to api/XDS_PROTOCOL.md (envoyproxy#7002)
  dispatcher: faster runOnAllThreads (envoyproxy#7011)
  example: add csrf sandbox (envoyproxy#6805)
  fix syntax of gcov exclusion zone. (envoyproxy#7023)
  /runtime_modify: add support for query params in body (envoyproxy#6977)
  stats: Create stats for http codes with the symbol table. (envoyproxy#6733)
  health check: fix more fallout from inline deletion change (envoyproxy#6988)
  Max heap fix (envoyproxy#7016)
  Add support to unregister from lifecycle notifications (envoyproxy#6984)
  build spdy_core_alt_svc_wire_format (envoyproxy#7010)
  ext_authz: Make sure initiateCall only called once (envoyproxy#6949)
  ...

Signed-off-by: Michael Puncel <mpuncel@squareup.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants