Pavel, Steve, Here is an updated series that tries to simplify the handling of allocating credits to compound requests by using a new method to atomically wait for n>=1 credits. Aside from simplifying compound_send_recv() it also solves a potential (but very unlikely) deadlock that could happen in the current code. The first two patches are just rearranging the code and changing signatures. There should not be any change in behaviour from them. The third patch makes it possible to wait for >1 credits atomically however no codepath yet uses this. Fourth patch is to address a potential starvation issue that could happen IF there are requests for >1 credits. Fifth patch changes compound_send_recv() to ask for the required n credits in one atomic wait.