OSDN Git Service

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)
commitd7d7a66aacd6fd8ca57baf08a7bac5421282f6f8
tree2565cb830065b2c06cefd085866c3de926d688b5
parent1bfa25ee30dfebe32a3b40c1a954052becbd7b8d
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