Commit Graph

5381 Commits

Author SHA1 Message Date
Soheil Hassas Yeganeh ad1b3e5094 Introduce grpc_byte_buffer_reader_peek and use it for Protobuf parsing.
grpc_byte_buffer_reader_next() copies and references the slice. This
is not always necessary since the caller will not use the slice
after destroying the byte buffer.

A prominent example is the protobuf parser, which
calls grpc_byte_buffer_reader_next() and immediately unrefs the slice
after the call. This ref() and unref() calls can be very expensive
in the hot path.

This commit introduces grpc_byte_buffer_reader_peek() which
essentialy return a pointer to the slice in the buffer, i.e.,
no copies, and no refs.

QPS of 1MiB 1 Channel callback benchmark increases by 5%.
More importantly insructions per cycle is increased by 10%.

Also add tests and benchmarks for byte_buffer_reader_peek()

This commit reaplies 509e77a5a3
2019-03-21 06:03:45 -04:00
Mark D. Roth ba7da20f1d
Merge pull request #18368 from markdroth/lb_policy_api_cleanup
LB policy API cleanup
2019-03-20 07:17:01 -07:00
rmstar 52801f088c
Merge pull request #18409 from rmstar/cfstreamtests
Fix CFStreamTests
2019-03-18 16:58:10 -07:00
Prashant Jaikumar f6479caf2a Fix CFStreamTests
- Pass extra param to grpc_endpoint_read() as the API has changed.
- Fixed build error seen with Xcode 10.
- Enable pipefail to xcodebuild errors are propagated to the caller.
2019-03-18 10:47:41 -07:00
Yihua Zhang 64caf4d3df fix clang-tidy errors 2019-03-15 12:57:25 -07:00
Bill Feng 22aeaa5fbc
Merge pull request #18390 from grpc/revert-18285-update-deps-version
Revert "Windows builds for gRPC C++ tests"
2019-03-15 10:57:48 -07:00
Jan Tattermusch cf6a311761
Revert "Windows builds for gRPC C++ tests" 2019-03-15 17:15:20 +01:00
Yihua Zhang b017c801b6 Add SPIFFE security stack to gRPC core 2019-03-14 15:24:48 -07:00
Mark D. Roth d069bc7721 LB policy API cleanup 2019-03-14 12:19:09 -07:00
Yang Gao c5311260fd
Merge pull request #18284 from yang-g/fuzzer
Fix fuzzer test
2019-03-08 20:19:34 -08:00
Bill Feng d61f690a33
Merge pull request #18285 from billfeng327/update-deps-version
Windows local Bazel build for gRPC C++ tests
2019-03-08 14:17:36 -08:00
Soheil Hassas Yeganeh 0031393a17
Merge pull request #18240 from soheilhy/tcp-inq
Implement TCP_INQ for gRPC in Linux
2019-03-08 11:29:39 -05:00
Yash Tibrewal 6b45cea2f0 Remove from poll-cv comments too 2019-03-07 17:56:49 -08:00
billfeng327 4241edeaa4 renamed tag to no_windows in conformation with Bazel and TensorFlow 2019-03-07 14:52:49 -08:00
Yash Tibrewal abcd5861eb Nuking the poll-cv polling engine 2019-03-07 14:49:24 -08:00
Soheil Hassas Yeganeh 18b19105f2 Implement TCP_INQ for gRPC in Linux
TCP_INQ is a socket option we added to Linux to report pending bytes
on the socket as a control message.

Using TCP_INQ we can accurately decide whether to continue read or not.
Add an urgent parameter, when we do not want to wait for EPOLLIN.

This commit improves the latency of 1 RPC unary (minimal benchmark)
significantly:

  Before:
    l_50: 61.3584984733
    l_90: 94.8328711277
    l_99: 126.211351174
    l_999: 158.722406029

  After:
    l_50: 51.3546011488 (-16%)
    l_90: 72.3420731581 (-23%)
    l_99: 103.280218974 (-18%)
    l_999: 130.905689996 (-17%)
2019-03-06 22:15:53 -05:00
billfeng327 928aedf5c8 Merge branch 'master' into update-deps-version 2019-03-06 15:48:29 -08:00
billfeng327 ab06853fc9 C++ Windows test builds 2019-03-06 15:47:49 -08:00
yang-g a6596b2fd5 Fix fuzzer test 2019-03-06 15:43:12 -08:00
Yang Gao d607a1e8a3
Merge pull request #18261 from yang-g/fuzzer
Unref raw slice as well when gzip fails
2019-03-05 22:12:12 -08:00
yang-g 94c38ee0a1 Add fuzzer test case 2019-03-05 14:34:24 -08:00
Soheil Hassas Yeganeh c060d55cc7
Revert "Introduce grpc_byte_buffer_reader_peek and use it for Protobuf parsing." 2019-03-05 14:01:01 -05:00
Mark D. Roth 51e718283e
Merge pull request #18094 from markdroth/subchannel_call_context_fix
Don't use a separate call context for subchannel calls
2019-03-04 15:49:26 -08:00
Mark D. Roth a04b0646de Don't use a separate call context for subchannel calls. 2019-03-04 14:38:02 -08:00
Soheil Hassas Yeganeh 509e77a5a3 Introduce grpc_byte_buffer_reader_peek and use it for Protobuf parsing.
grpc_byte_buffer_reader_next() copies and references the slice. This
is not always necessary since the caller will not use the slice
after destroying the byte buffer.

A prominent example is the protobuf parser, which
calls grpc_byte_buffer_reader_next() and immediately unrefs the slice
after the call. This ref() and unref() calls can be very expensive
in the hot path.

This commit introduces grpc_byte_buffer_reader_peek() which
essentialy return a pointer to the slice in the buffer, i.e.,
no copies, and no refs.

QPS of 1MiB 1 Channel callback benchmark increases by 5%.
More importantly insructions per cycle is increased by 10%.

Also add tests and benchmarks for byte_buffer_reader_peek()
2019-03-04 14:17:46 -05:00
Mark D. Roth 251d66aac6 Convert client channel factory to C++ 2019-03-01 08:40:21 -08:00
Nicolas Noble 0fc01a302f
Merge pull request #18171 from huynq0911/fix_duplicated_word
Fix some typos
2019-02-27 19:15:53 -08:00
Yang Gao 40241c5236
Merge pull request #18157 from yang-g/rollbackrollback
Roll-forward PR17308
2019-02-27 17:04:19 -08:00
Vu Cong Tuan 9c4de5a0ff Fix typos in test code
Signed-off-by: Vu Cong Tuan <tuanvc@vn.fujitsu.com>
2019-02-27 09:11:01 +07:00
Nguyen Quang Huy c9acd8380f Fix some typos
Correct some words spelling for reading more easily.
2019-02-26 15:46:13 +07:00
yang-g 456f748b2f Revert "Merge pull request #18146 from grpc/revert-17308-shutdown"
This reverts commit 9079e98dfc, reversing
changes made to 76a38bfcc2.
2019-02-25 10:11:06 -08:00
Mark D. Roth c9aebe3880
Merge pull request #18081 from markdroth/service_config_ref_counted
Make service config ref-counted and hold refs to it in LB config.
2019-02-25 07:32:12 -08:00
Yang Gao 4bc2ca4de6
Revert "Move grpc_shutdown internals to a detached thread" 2019-02-22 16:34:24 -08:00
Mark D. Roth e40177fad0 Make service config ref-counted and hold refs to it in LB config. 2019-02-22 16:33:50 -08:00
Mark D. Roth 5f00cfd3bd
Merge pull request #18096 from markdroth/lb_policy_api
Second attempt: LB policy picker API
2019-02-22 10:10:43 -08:00
Mark D. Roth 624fb64f61 LB policy ctors no longer perform updates; UpdateLocked() must be called
after construction.
2019-02-21 14:01:22 -08:00
yang-g cedc76bf38 Resolve comments 2019-02-20 08:45:31 -08:00
yang-g fe3555f0fd Merge with head and resolve conflict 2019-02-19 20:46:51 -08:00
Mark D. Roth aa149fedbb Revert "Merge pull request #18093 from grpc/revert-17770-lb_policy_picker_api"
This reverts commit f327b83706, reversing
changes made to b3b5d63423.
2019-02-19 13:19:24 -08:00
hcaseyal 275296c594
Revert "LB policy picker API" 2019-02-19 11:05:52 -08:00
yang-g 3227abf717 fix percent en/decode fuzzers 2019-02-15 22:57:44 -08:00
yang-g 0df63d3c98 Merge branch 'master' into shutdown 2019-02-15 21:51:03 -08:00
yang-g 86b23adc7f Other comments 2019-02-15 16:26:31 -08:00
xtao 7766912dda
fix more detected mu/cv leaks 2019-02-16 00:00:50 +08:00
xtao 902820a5de
1) fix the asan tests caught leaks;
2) fix the tsan tests caught data races;
2019-02-16 00:00:50 +08:00
jiangtaoli2016 f5a71f7313 Clean up deprecated tsi_create_ssl_server_handshaker_factory callers 2019-02-14 17:18:21 -08:00
yang-g 545c555d31 Rename new public API 2019-02-14 14:22:40 -08:00
yang-g 233406d450 generate projects 2019-02-13 11:29:40 -08:00
yang-g 684643ff0a Test fixing php 2019-02-13 11:02:48 -08:00
Mark D. Roth bab8123763 LB policy picker API 2019-02-13 08:30:04 -08:00