diff options
author | Ronnie Sahlberg <lsahlber@redhat.com> | 2019-03-08 12:58:21 +1000 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2019-03-14 19:32:35 -0500 |
commit | 16b34aa44b257155d9392a19e08e4ce139bc2789 (patch) | |
tree | a82a838ff7d699fe399913d393e9544b51b25c29 /tools/lib/string.c | |
parent | b227d215deef4f3528b8f754accef4db03539a59 (diff) | |
download | linux-16b34aa44b257155d9392a19e08e4ce139bc2789.tar.gz linux-16b34aa44b257155d9392a19e08e4ce139bc2789.tar.bz2 linux-16b34aa44b257155d9392a19e08e4ce139bc2789.zip |
cifs: prevent starvation in wait_for_free_credits for multi-credit requests
Reserve the last MAX_COMPOUND credits for any request asking for >1 credit.
This is to prevent future compound requests from becoming starved while waiting
for potentially many requests is there is a large number of concurrent
singe-credit requests.
However, we need to protect from servers that are very slow to hand out
new credits on new sessions so we only do this IFF there are 2*MAX_COMPOUND
(arbitrary) credits already in flight.
Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Diffstat (limited to 'tools/lib/string.c')
0 files changed, 0 insertions, 0 deletions