]> git.baikalelectronics.ru Git - kernel.git/commit
smb3: display stats counters for number of slow commands
authorSteve French <stfrench@microsoft.com>
Sat, 4 Aug 2018 10:24:34 +0000 (05:24 -0500)
committerSteve French <stfrench@microsoft.com>
Tue, 7 Aug 2018 19:30:59 +0000 (14:30 -0500)
commite554bb112a44d30549d87e08c164e94d0bb95b32
tree447717951ad83b14eb46b9ebb2a2a3d053380144
parent075233c85279c2986b96dde48e5b1ab77ad95f2f
smb3: display stats counters for number of slow commands

When CONFIG_CIFS_STATS2 is enabled keep counters for slow
commands (ie server took longer than 1 second to respond)
by SMB2/SMB3 command code.  This can help in diagnosing
whether performance problems are on server (instead of
client) and which commands are causing the problem.

Sample output (the new lines contain words "slow responses ...")

$ cat /proc/fs/cifs/Stats
Resources in use
CIFS Session: 1
Share (unique mount targets): 2
SMB Request/Response Buffer: 1 Pool size: 5
SMB Small Req/Resp Buffer: 1 Pool size: 30
Total Large 10 Small 490 Allocations
Operations (MIDs): 0

0 session 0 share reconnects
Total vfs operations: 67 maximum at one time: 2
4 slow responses from localhost for command 5
1 slow responses from localhost for command 6
1 slow responses from localhost for command 14
1 slow responses from localhost for command 16

1) \\localhost\test
SMBs: 243
Bytes read: 1024000  Bytes written: 104857600
TreeConnects: 1 total 0 failed
TreeDisconnects: 0 total 0 failed
Creates: 40 total 0 failed
Closes: 39 total 0 failed
...

Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
fs/cifs/cifs_debug.c
fs/cifs/cifsglob.h
fs/cifs/transport.c