Skip to content

Simplify credits handling for compound requests

Ronnie Sahlberg linux-cifs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5cifs: change wait_for_free_request() to take flags as argumentfs/cifs/transport.c+17 -160 replies
2/5cifs: pass flags down into wait_for_free_credits()fs/cifs/transport.c+14 -160 replies
3/5cifs: wait_for_free_credits() make it possible to wait for >=1 creditsfs/cifs/cifsglob.h fs/cifs/smb2ops.c fs/cifs/transport.c+10 -100 replies
4/5cifs: prevent starvation in wait_for_free_credits for multi-credit requestsfs/cifs/transport.c+23 -02 replies
5/5cifs: simplify how we handle credits in compond_send_recv()fs/cifs/transport.c+20 -610 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] Simplify credits handling for compound requests

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.