Todd Lipcon has posted comments on this change. ( http://gerrit.cloudera.org:8080/8895 )
Change subject: KUDU-1865: Avoid some heap allocations in RPC paths ...................................................................... Patch Set 2: (3 comments) http://gerrit.cloudera.org:8080/#/c/8895/2//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/8895/2//COMMIT_MSG@16 PS2, Line 16: central cache list in TCMalloc and causes spin lock contention. would be good to accompany this with some benchmark results http://gerrit.cloudera.org:8080/#/c/8895/2//COMMIT_MSG@21 PS2, Line 21: Introduce a new interface RpcContext::RespondSuccess(const Message& message) : which allows callers to pass the response PB directly as argument instead : of using the preallocated response PB owned by RpcContext. This allows callers : to allocate the response PB on the stack, thus avoiding the need to use the heap. I'm not so keen on this API change here. It seems a bit messy to have two different ways of responding. Instead, what if each call used a single 'Arena' instance, and the response object in GeneratedServiceIf::Handle(...) allocated the response on that arena? The request and other such items could also be on that Arena? At the least I think it's worth splitting this API-changing patch out from the part of the patch which is a pure transparent optimization http://gerrit.cloudera.org:8080/#/c/8895/2/src/kudu/rpc/connection.cc File src/kudu/rpc/connection.cc: http://gerrit.cloudera.org:8080/#/c/8895/2/src/kudu/rpc/connection.cc@430 PS2, Line 430: scoped_refptr<Connection> conn_; is this required for correctness in this patch? -- To view, visit http://gerrit.cloudera.org:8080/8895 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I407b4782c9f3cd39ad3c6e0d21fd9542be34b118 Gerrit-Change-Number: 8895 Gerrit-PatchSet: 2 Gerrit-Owner: Michael Ho <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Michael Ho <[email protected]> Gerrit-Reviewer: Mostafa Mokhtar <[email protected]> Gerrit-Reviewer: Sailesh Mukil <[email protected]> Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon <[email protected]> Gerrit-Comment-Date: Thu, 21 Dec 2017 04:45:05 +0000 Gerrit-HasComments: Yes
