svcrdma: Add gfp flags to svc_rdma_post_recv()
authorChuck Lever <chuck.lever@oracle.com>
Thu, 7 Jan 2016 19:49:37 +0000 (14:49 -0500)
committerDoug Ledford <dledford@redhat.com>
Tue, 19 Jan 2016 20:30:48 +0000 (15:30 -0500)
commit39b09a1a121cb22820c374f4e92f7ca34be1b75d
tree215b3ad68610c11cca7ba37391e62d10b568c1fc
parent71810ef3271d1a06f7002c55c7e354d8c3233762
svcrdma: Add gfp flags to svc_rdma_post_recv()

svc_rdma_post_recv() allocates pages for receive buffers on-demand.
It uses GFP_KERNEL so the allocator tries hard, and may sleep. But
I'm about to add a call to svc_rdma_post_recv() from a function
that may not sleep.

Since all svc_rdma_post_recv() call sites can tolerate its failure,
allow it to fail if the page allocator returns nothing. Longer term,
receive buffers, being a finite resource per-connection, should be
pre-allocated and re-used.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Acked-by: Bruce Fields <bfields@fieldses.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
include/linux/sunrpc/svc_rdma.h
net/sunrpc/xprtrdma/svc_rdma_sendto.c
net/sunrpc/xprtrdma/svc_rdma_transport.c
This page took 0.050902 seconds and 5 git commands to generate.