OSDN Git Service

cifs: use the least loaded channel for sending requests
authorShyam Prasad N <sprasad@microsoft.com>
Mon, 19 Dec 2022 05:40:44 +0000 (05:40 +0000)
committerSteve French <stfrench@microsoft.com>
Tue, 21 Feb 2023 07:24:48 +0000 (01:24 -0600)
commitea90708d3cf3d0d92c02afe445ad463fb3c6bf10
tree91dca5f122908052f5acfa1155421eb5b509df19
parente7388b8a1a5bdf47a9a46803a5686387c1ce060d
cifs: use the least loaded channel for sending requests

Till now, we've used a simple round robin approach to
distribute the requests between the channels. This does
not work well if the channels consume the requests at
different speeds, even if the advertised speeds are the
same.

This change will allow the client to pick the channel
with least number of requests currently in-flight. This
will disregard the link speed, and select a channel
based on the current load of the channels.

For cases when all the channels are equally loaded,
fall back to the old round robin method.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/transport.c