Re: [PATCH v4 10/10] IB/mlx5: Simplify completion into a wait_event

2016-11-06 Thread Binoy Jayan
Hi Linus, On 3 November 2016 at 21:07, Linus Torvalds wrote: > This is wrong. Will change it back. > Since that "umr_context" variable is on the stack, and you are waiting > for it to be fully done, it really should be a completion. Thank you for sharing your insight with wait_event and comple

Re: [PATCH v4 10/10] IB/mlx5: Simplify completion into a wait_event

2016-11-03 Thread Linus Torvalds
On Wed, Oct 26, 2016 at 11:59 PM, Binoy Jayan wrote: > Convert the completion 'mlx5_ib_umr_context:done' to a wait_event as it > just waits for the return value to be filled. This is wrong. Since that "umr_context" variable is on the stack, and you are waiting for it to be fully done, it really

Re: [PATCH v4 10/10] IB/mlx5: Simplify completion into a wait_event

2016-11-02 Thread Binoy Jayan
Hi, On 31 October 2016 at 02:47, Sagi Grimberg wrote: > How is this simpler? It is simpler in the sense that it is a light weight primitive and that only one thread waits on the event here. In our case since 'umr_context.done' is an "on stack" variable, and has only one thread waiting on that e

Re: [PATCH v4 10/10] IB/mlx5: Simplify completion into a wait_event

2016-11-02 Thread Leon Romanovsky
On Sun, Oct 30, 2016 at 11:17:57PM +0200, Sagi Grimberg wrote: > > > On 27/10/16 09:59, Binoy Jayan wrote: > >Convert the completion 'mlx5_ib_umr_context:done' to a wait_event as it > >just waits for the return value to be filled. On top of Sagi's response, I'm failing to understand why it is need

Re: [PATCH v4 10/10] IB/mlx5: Simplify completion into a wait_event

2016-10-30 Thread Sagi Grimberg
On 27/10/16 09:59, Binoy Jayan wrote: Convert the completion 'mlx5_ib_umr_context:done' to a wait_event as it just waits for the return value to be filled. Signed-off-by: Binoy Jayan --- drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 +- drivers/infiniband/hw/mlx5/mr.c | 9 + include/

[PATCH v4 10/10] IB/mlx5: Simplify completion into a wait_event

2016-10-27 Thread Binoy Jayan
Convert the completion 'mlx5_ib_umr_context:done' to a wait_event as it just waits for the return value to be filled. Signed-off-by: Binoy Jayan --- drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 +- drivers/infiniband/hw/mlx5/mr.c | 9 + include/rdma/ib_verbs.h | 1 + 3 file