android_kernel_xiaomi_sm8350/fs/ocfs2
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
..
cluster ocfs2: introduce sc->sc_send_lock to protect outbound outbound messages 2007-02-07 12:15:11 -08:00
dlm ocfs2_dlm: Add timeout to dlm join domain 2007-02-07 12:10:39 -08:00
alloc.c [PATCH] Fix numerous kcalloc() calls, convert to kzalloc() 2006-12-13 09:05:52 -08:00
alloc.h ocfs2: Remove struct ocfs2_journal_handle in favor of handle_t 2006-12-01 18:28:28 -08:00
aops.c ocfs2: Allow direct I/O read past end of file 2006-12-28 16:38:08 -08:00
aops.h ocfs2: Remove struct ocfs2_journal_handle in favor of handle_t 2006-12-01 18:28:28 -08:00
buffer_head_io.c
buffer_head_io.h
dcache.c
dcache.h
dir.c [PATCH] struct path: convert ocfs2 2006-12-08 08:28:48 -08:00
dir.h ocfs2: Remove struct ocfs2_journal_handle in favor of handle_t 2006-12-01 18:28:28 -08:00
dlmglue.c ocfs2: always unmap in ocfs2_data_convert_worker() 2006-12-28 16:38:59 -08:00
dlmglue.h ocfs2: core atime update functions 2006-12-01 18:28:51 -08:00
endian.h
export.c ocfs2: cleanup ocfs2_iget() errors 2007-01-21 16:19:12 -08:00
export.h
extent_map.c [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
extent_map.h
file.c ocfs2: ignore NULL vfsmnt in ocfs2_should_update_atime() 2006-12-28 16:38:32 -08:00
file.h ocfs2: implement i_op->permission 2006-12-01 18:29:14 -08:00
heartbeat.c ocfs2: local mounts 2006-12-07 17:37:53 -08:00
heartbeat.h
inode.c ocfs2: cleanup ocfs2_iget() errors 2007-01-21 16:19:12 -08:00
inode.h [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
ioctl.c ocfs2: Remove struct ocfs2_journal_handle in favor of handle_t 2006-12-01 18:28:28 -08:00
ioctl.h
journal.c ocfs2: local mounts 2006-12-07 17:37:53 -08:00
journal.h ocfs2: ocfs2_link() journal credits update 2007-02-01 12:03:19 -08:00
localalloc.c [PATCH] Fix numerous kcalloc() calls, convert to kzalloc() 2006-12-13 09:05:52 -08:00
localalloc.h ocfs2: Remove struct ocfs2_journal_handle in favor of handle_t 2006-12-01 18:28:28 -08:00
Makefile
mmap.c ocfs2: local mounts 2006-12-07 17:37:53 -08:00
mmap.h
namei.c ocfs2: Directory c/mtime update fixes 2007-01-21 16:18:49 -08:00
namei.h ocfs2: Remove struct ocfs2_journal_handle in favor of handle_t 2006-12-01 18:28:28 -08:00
ocfs1_fs_compat.h
ocfs2_fs.h [PATCH] ocfs2: fix thinko in ocfs2_backup_super_blkno() 2007-01-26 14:53:27 -08:00
ocfs2_lockid.h
ocfs2.h ocfs2: local mounts 2006-12-07 17:37:53 -08:00
slot_map.c [PATCH] Fix numerous kcalloc() calls, convert to kzalloc() 2006-12-13 09:05:52 -08:00
slot_map.h
suballoc.c [PATCH] Fix numerous kcalloc() calls, convert to kzalloc() 2006-12-13 09:05:52 -08:00
suballoc.h ocfs2: Remove struct ocfs2_journal_handle in favor of handle_t 2006-12-01 18:28:28 -08:00
super.c [PATCH] Fix numerous kcalloc() calls, convert to kzalloc() 2006-12-13 09:05:52 -08:00
super.h
symlink.c ocfs2: Don't print errors when following symlinks 2007-01-21 16:18:14 -08:00
symlink.h
sysfile.c
sysfile.h
uptodate.c [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
uptodate.h
ver.c
ver.h
vote.c ocfs2: Added post handler callable function in o2net message handler 2007-02-07 12:06:56 -08:00
vote.h