Re: [PATCH] rds: Fix inaccurate accounting of unsignaled wrs
From: Håkon Bugge Date: Tue, 24 Oct 2017 16:16:28 +0200 > The number of unsignaled work-requests posted to the IB send queue is > tracked by a counter in the rds_ib_connection struct. When it reaches > zero, or the caller explicitly asks for it, the send-signaled bit is > set in send_flags and the counter is reset. This is performed by the > rds_ib_set_wr_signal_state() function. > > However, this function is not always used which yields inaccurate > accounting. This commit fixes this, re-factors a code bloat related to > the matter, and makes the actual parameter type to the function > consistent. > > Signed-off-by: Håkon Bugge Applied.
Re: [PATCH] rds: Fix inaccurate accounting of unsignaled wrs
On 10/24/2017 9:15 AM, Håkon Bugge wrote: On 24 Oct 2017, at 18:05, Santosh Shilimkar mailto:santosh.shilim...@oracle.com>> wrote: [...] Instead of partially doing changes inside/outside helper, can also add inline helper for solicited state like rds_ib_set_wr_solicited_state() and use that along with this change. Why? There is no book-keeping associated with setting send-solicited. Its set on the last fragment of a message and on the last fragment sent before throttling due to flow-control. Creating a function to perform: FOO |= BAR; seems like an overkill to me. Its just inline helper and keep code consistent for flag manipulation. Compiler output will be like "FOO =| BAR;" :-) That being said, in my opinion the fragments of a (large) send should be scattered with send-solicited. But that is another commit. But with such a commit, I agree with you, a helper function is required. We already talked about it so lets leave it there. Regards, Santosh
Re: [PATCH] rds: Fix inaccurate accounting of unsignaled wrs
On 10/24/2017 7:16 AM, Håkon Bugge wrote: The number of unsignaled work-requests posted to the IB send queue is tracked by a counter in the rds_ib_connection struct. When it reaches zero, or the caller explicitly asks for it, the send-signaled bit is set in send_flags and the counter is reset. This is performed by the rds_ib_set_wr_signal_state() function. However, this function is not always used which yields inaccurate accounting. This commit fixes this, re-factors a code bloat related to the matter, and makes the actual parameter type to the function consistent. Signed-off-by: Håkon Bugge --- Instead of partially doing changes inside/outside helper, can also add inline helper for solicited state like rds_ib_set_wr_solicited_state() and use that along with this change. Regards, Santosh