Thread (1 message) 1 message, 1 author, 2016-07-31

Re: [PATCH] IB/mlx4: Allocation of CQ resize structure doesn't need to be atomic

From: Leon Romanovsky <hidden>
Date: 2016-07-31 06:42:45

On Thu, Jul 28, 2016 at 09:58:43PM -0700, Roland Dreier wrote:
From: Roland Dreier <redacted>

We allocate a small tracking structure as part of mlx4_ib_resize_cq().
However, we don't need to use GFP_ATOMIC -- immediately after the
allocation, we call mlx4_cq_resize(), which allocates a command
mailbox with GFP_KERNEL and then sleeps on a firmware command, so we
better not be in an atomic context.

This actually has a real impact, because when this GFP_ATOMIC
allocation fails (and GFP_ATOMIC does fail in practice) then a
userspace consumer resizing a CQ will get a spurious failure that we
can easily avoid.

Signed-off-by: Roland Dreier <redacted>
Thanks,
Reviewed-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help