Tuvie opened a new pull request, #1999:
URL: https://github.com/apache/incubator-brpc/pull/1999

   ### What problem does this PR solve?
   
   Issue Number: 1995
   
   Problem Summary: When using IOBuf::append_user_data, if the application 
specify a buffer with an offset over the base address registered with 
rdma::RegisterMemoryForRdma, brpc reports a failure for invalid memory region.
   
   ### What is changed and the side effects?
   
   Changed: Use a fixed-length array to manage the user-defined memory regions. 
To lookup the lkey for a buffer specified in append_user_data, brpc scans the 
array to find the correct region. To guarantee the performance of lkey lookup, 
we avoid using mutex for the lookup in this array. 
   
   Side effects:
   - Performance effects(性能影响): 
   
   - Breaking backward compatibility(向后兼容性): To guarantee the performance of 
lkey (linear) lookup, brpc only support at most 16 user-defined memory regions. 
The application should maintain the user-defined buffer with a memory pool and 
register the pool one time. And since the lookup is not guarded with a mutex, 
the application should try not to register or deregister memory during rpc 
processing.
   
   ---
   ### Check List:
   - Please make sure your changes are compilable(请确保你的更改可以通过编译).
   - When providing us with a new feature, it is best to add related 
tests(如果你向我们增加一个新的功能, 请添加相关测试).
   - Please follow [Contributor Covenant Code of 
Conduct](../../master/CODE_OF_CONDUCT.md).(请遵循贡献者准则).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to