linux_dsm_epyc7002/fs/ocfs2/cluster
Zhen Wei 925037bcba ocfs2: introduce sc->sc_send_lock to protect outbound outbound messages
When there is a lot of multithreaded I/O usage, two threads can collide
while sending out a message to the other nodes. This is due to the lack of
locking between threads while sending out the messages.

When a connected TCP send(), sendto(), or sendmsg() arrives in the Linux
kernel, it eventually comes through tcp_sendmsg(). tcp_sendmsg() protects
itself by acquiring a lock at invocation by calling lock_sock().
tcp_sendmsg() then loops over the buffers in the iovec, allocating
associated sk_buff's and cache pages for use in the actual send. As it does
so, it pushes the data out to tcp for actual transmission. However, if one
of those allocation fails (because a large number of large sends is being
processed, for example), it must wait for memory to become available. It
does so by jumping to wait_for_sndbuf or wait_for_memory, both of which
eventually cause a call to sk_stream_wait_memory(). sk_stream_wait_memory()
contains a code path that calls sk_wait_event(). Finally, sk_wait_event()
contains the call to release_sock().

The following patch adds a lock to the socket container in order to
properly serialize outbound requests.

From: Zhen Wei <zwei@novell.com>
Acked-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2007-02-07 12:15:11 -08:00
..
endian.h [PATCH] OCFS2: The Second Oracle Cluster Filesystem 2006-01-03 11:45:46 -08:00
heartbeat.c ocfs2: export heartbeat thread pid via configfs 2006-12-28 16:40:32 -08:00
heartbeat.h [PATCH] OCFS2: The Second Oracle Cluster Filesystem 2006-01-03 11:45:46 -08:00
Makefile [PATCH] OCFS2: The Second Oracle Cluster Filesystem 2006-01-03 11:45:46 -08:00
masklog.c ocfs2: Set .owner on masklog sysfs attributes. 2006-03-01 11:43:20 -08:00
masklog.h ocfs2: Compile-time disabling of ocfs2 debugging output. 2006-06-29 14:48:30 -07:00
nodemanager.c [PATCH] Fix numerous kcalloc() calls, convert to kzalloc() 2006-12-13 09:05:52 -08:00
nodemanager.h [patch 2/3] OCFS2 Configurable timeouts 2006-12-07 18:13:20 -08:00
ocfs2_heartbeat.h ocfs2: warn the user on a dead timeout mismatch 2006-06-29 15:45:35 -07:00
ocfs2_nodemanager.h [PATCH] OCFS2: The Second Oracle Cluster Filesystem 2006-01-03 11:45:46 -08:00
quorum.c WorkStruct: make allyesconfig 2006-11-22 14:57:56 +00:00
quorum.h [PATCH] OCFS2: The Second Oracle Cluster Filesystem 2006-01-03 11:45:46 -08:00
sys.c [PATCH] This patch contains the following cleanups: 2006-01-03 11:45:55 -08:00
sys.h [PATCH] OCFS2: The Second Oracle Cluster Filesystem 2006-01-03 11:45:46 -08:00
tcp_internal.h ocfs2: introduce sc->sc_send_lock to protect outbound outbound messages 2007-02-07 12:15:11 -08:00
tcp.c ocfs2: introduce sc->sc_send_lock to protect outbound outbound messages 2007-02-07 12:15:11 -08:00
tcp.h ocfs2: Added post handler callable function in o2net message handler 2007-02-07 12:06:56 -08:00
ver.c [PATCH] OCFS2: The Second Oracle Cluster Filesystem 2006-01-03 11:45:46 -08:00
ver.h [PATCH] OCFS2: The Second Oracle Cluster Filesystem 2006-01-03 11:45:46 -08:00