]> www.infradead.org Git - users/jedix/linux-maple.git/commit
SDP - Method used to allocate socket buffers may cause node to hang
authorJim Mott <jim@mellanox.com>
Tue, 23 Oct 2007 17:58:27 +0000 (10:58 -0700)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 6 Oct 2015 12:04:10 +0000 (05:04 -0700)
commit7194597b9430ba64cd44f5c80940027d3d842622
tree1bc247631af30428d3599b4a66fb517ea0586b30
parent859b604e7da69f65edc9dce711d32cba3e33ce02
SDP - Method used to allocate socket buffers may cause node to hang

The problem we are seeing is that if a node is under load, and
a memory allocation fails (say in sock_sendmsg()), the kernel will
use the allocation policy to decide how to proceed with the allocation.
If GFP_KERNEL is specified, then the kernel may attempt to free pages
through the iSCSI block device that is making the socket call, which
would result in a deadlock.  Use of GFP_NOIO should prevent the kernel
from using the IO backend to free memory resources.

Each kernel level socket has an allocation flag to specify the
memory allocation policy for socket buffers, the default is GFP_ATOMIC
(or GFP_KERNEL for SDP).  If the caller creates a socket with the
policy set to GFP_NOFS or GFP_NOIO this should be the allocation
policy used by the SDP layer.

Signed-off-by: Jim Mott <jim@mellanox.com>
drivers/infiniband/ulp/sdp/sdp_bcopy.c