]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: avoid use of global locks for high contention data
authorShyam Prasad N <sprasad@microsoft.com>
Wed, 27 Jul 2022 19:49:56 +0000 (14:49 -0500)
committerSteve French <stfrench@microsoft.com>
Mon, 1 Aug 2022 06:34:45 +0000 (01:34 -0500)
commit552abef15c9b59e0d46f9bcf16b264358eadb4d3
tree2565cb830065b2c06cefd085866c3de926d688b5
parent13d00bfaefe69cb008ee05602006152e5ac64cf2
cifs: avoid use of global locks for high contention data

During analysis of multichannel perf, it was seen that
the global locks cifs_tcp_ses_lock and GlobalMid_Lock, which
were shared between various data structures were causing a
lot of contention points.

With this change, we're breaking down the use of these locks
by introducing new locks at more granular levels. i.e.
server->srv_lock, ses->ses_lock and tcon->tc_lock to protect
the unprotected fields of server, session and tcon structs;
and server->mid_lock to protect mid related lists and entries
at server level.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
13 files changed:
fs/cifs/cifs_debug.c
fs/cifs/cifsencrypt.c
fs/cifs/cifsfs.c
fs/cifs/cifsglob.h
fs/cifs/cifssmb.c
fs/cifs/connect.c
fs/cifs/dfs_cache.c
fs/cifs/misc.c
fs/cifs/smb1ops.c
fs/cifs/smb2ops.c
fs/cifs/smb2pdu.c
fs/cifs/smb2transport.c
fs/cifs/transport.c