chenBright commented on PR #3720: URL: https://github.com/apache/brpc/pull/3720#issuecomment-6859155882
Additional changes beyond the review fixes: - **Pressure-aware zero-copy reception:** Export a receive block only when replacement capacity is available. Otherwise, copy the payload and reuse the registered block, preserving receive progress even when incomplete messages retain all exported buffers. - **Fewer software wakeups:** Remove block-return notifications and their arm/disarm protocol. Returned blocks are collected during subsequent progress, while background growth still sends completion notifications. Remove the initial worker Kick and coalesce close-related wakeups. - **Bounded CQ processing and earlier refill:** Process at most 32 completions from each CQ per progress pass, and replenish receive slots immediately after RX processing, before running pending callbacks. - **Fewer CQ arm operations:** When a normal CQ batch is full, perform the second progress pass without rearming. The worker must eventually arm both CQs and recheck before relinquishing ownership. - **Receive depth during connection retirement:** Refill between RX drain batches within a bounded budget. A short poll completes the drain barrier, while the budget guarantees termination under continuous traffic. - **Nonblocking command dequeue:** Add `MPSCQueue::TryDequeue()` and use it for worker commands. An incompletely published node no longer makes the worker spin and delay unrelated CQ processing or refill. - **Cheaper receive handoff:** Use `ReceivedBuffer` and `IOBuf::movable()` to transfer ownership through enqueue, dequeue and aggregation without unnecessary Block reference increments and decrements. - **Less work under the progress lock:** Accumulate results in vectors with move semantics, then deduplicate outside the lock. Consolidate failure commands into the existing callback queue. - **Simpler scheduling and better diagnostics:** Make delivery urgency explicit and add contextual logs for unexpected verbs and resource-management failures. -- 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]
