[PATCH] IB/mlx4: Replace kfree with kvfree in mlx4_ib_destroy_srq

2015-12-16 Thread Wengang Wang
Commit 0ef2f05c7e02ff99c0b5b583d7dee2cd12b053f2 uses vmalloc for WR buffers when needed and uses kvfree to free the buffers. It missed changing kfree to kvfree in mlx4_ib_destroy_srq(). Reported-by: Matthew Finaly Signed-off-by: Wengang Wang --- drivers/infiniband/hw/mlx4/srq.c | 2 +- 1 file

Re: [PATCH V3] IB/mlx4: Use vmalloc for WR buffers when needed

2015-12-16 Thread Wengang Wang
mlx4_ib_destroy_srq(). In the current code if the srq wrid is allocated using vmalloc, then on cleanup we will use kfree, which is a bug. Thanks, -matt On 10/7/15, 10:27 PM, "linux-rdma-ow...@vger.kernel.org on behalf of Wengang Wang" wrote: There are several hits that WR buffer allocati

[PATCH V3] IB/mlx4: Use vmalloc for WR buffers when needed

2015-10-07 Thread Wengang Wang
There are several hits that WR buffer allocation(kmalloc) failed. It failed at order 3 and/or 4 contigous pages allocation. At the same time there are actually 100MB+ free memory but well fragmented. So try vmalloc when kmalloc failed. Signed-off-by: Wengang Wang Acked-by: Or Gerlitz

[PATCH V2] IB/mlx4: Use correct order of variables in log message

2015-10-07 Thread Wengang Wang
There is a mis-order in mlx4 log. Fix it. Signed-off-by: Wengang Wang Acked-by: Or Gerlitz --- drivers/net/ethernet/mellanox/mlx4/cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx4/cmd.c b/drivers/net/ethernet/mellanox/mlx4/cmd.c index

Re: [PATCH] IB/mlx4: correct order of variables in log

2015-10-07 Thread Wengang Wang
Thanks Or. I will resend the revised(title) the patch with your Ack. thanks, wengang 在 2015年10月08日 12:52, Or Gerlitz 写道: On 9/28/2015 5:08 AM, Wengang Wang wrote: There is a mis-order in mlx4 log. Fix it. Signed-off-by: Wengang Wang I wanted to ack it, but wait... We want commits to our

Re: [PATCH] IPoIB: serialize changing on tx_outstanding

2015-10-07 Thread Wengang Wang
Hi Leon, thanks for review. 在 2015年10月08日 12:33, Leon Romanovsky 写道: On Mon, Sep 28, 2015 at 01:42:10PM +0800, Wengang Wang wrote: The changing on tx_outstanding should be protected by spinlock or to be atomic operations. Such log is found in dmesg: Sep 16 14:20:53 naep11x06 kernel: ib0

Re: [PATCH] IB/mlx4: correct order of variables in log

2015-10-07 Thread Wengang Wang
Hi, Any comment on this patch? thanks, wengang 在 2015年09月28日 10:08, Wengang Wang 写道: There is a mis-order in mlx4 log. Fix it. Signed-off-by: Wengang Wang --- drivers/net/ethernet/mellanox/mlx4/cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet

Re: [PATCH] IPoIB: serialize changing on tx_outstanding

2015-10-07 Thread Wengang Wang
Hi, Any comment on this patch? thanks, wengang 在 2015年09月28日 13:42, Wengang Wang 写道: The changing on tx_outstanding should be protected by spinlock or to be atomic operations. Such log is found in dmesg: Sep 16 14:20:53 naep11x06 kernel: ib0: queue stopped 1, tx_head 1034733, tx_tail

[PATCH] IPoIB: serialize changing on tx_outstanding

2015-09-27 Thread Wengang Wang
nd to avoid the possible decreasing before increasing in case the running of increasing is scheduled later than the interrupt handler. Signed-off-by: Wengang Wang --- drivers/infiniband/ulp/ipoib/ipoib_cm.c | 40 +++-- drivers/infiniband/ulp/ipoib/ipoib_ib.c | 24

[PATCH] IB/mlx4: correct order of variables in log

2015-09-27 Thread Wengang Wang
There is a mis-order in mlx4 log. Fix it. Signed-off-by: Wengang Wang --- drivers/net/ethernet/mellanox/mlx4/cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx4/cmd.c b/drivers/net/ethernet/mellanox/mlx4/cmd.c index 0a32020..150fbb3

Re: [PATCH] IB/mlx4: Use vmalloc for WR buffers when needed

2015-09-24 Thread Wengang Wang
Hi Or, 在 2015年09月24日 19:57, Or Gerlitz 写道: On Thu, Sep 24, 2015 at 1:49 PM, Wengang Wang wrote: @@ -786,8 +787,14 @@ static int create_qp_common(struct mlx4_ib_dev *dev, struct ib_pd *pd, if (err) goto err_mtt; - qp->sq.wrid = kmal

[PATCH] IB/mlx4: Use vmalloc for WR buffers when needed

2015-09-24 Thread Wengang Wang
There are several hits that WR buffer allocation(kmalloc) failed. It failed at order 3 and/or 4 contigous pages allocation. At the same time there are actually 100MB+ free memory but well fragmented. So try vmalloc when kmalloc failed. Signed-off-by: Wengang Wang --- drivers/infiniband/hw/mlx4

Re: [PATCH] IB/mlx4: Use vmalloc for WR buffers when needed

2015-09-24 Thread Wengang Wang
在 2015年09月24日 16:07, Or Gerlitz 写道: On 9/24/2015 9:52 AM, Wengang Wang wrote: } else { -kfree(qp->sq.wrid); -kfree(qp->rq.wrid); +if (is_vmalloc_addr(qp->sq.wrid)) +vfree(qp->sq.wrid); +else +kfree(qp->sq.wrid)

[PATCH] IB/mlx4: Use vmalloc for WR buffers when needed

2015-09-23 Thread Wengang Wang
There are several hits that WR buffer allocation(kmalloc) failed. It failed at order 3 and/or 4 contigous pages allocation. At the same time there are actually 100MB+ free memory but well fragmented. So try vmalloc when kmalloc failed. Signed-off-by: Wengang Wang --- drivers/infiniband/hw/mlx4

Re: [PATCH] mlx4: vmalloc for mlx4_ib_wq.wrid and mlx4_ib_srq.wrid

2015-09-23 Thread Wengang Wang
Hi Or, 在 2015年09月24日 13:33, Or Gerlitz 写道: On 9/24/2015 5:10 AM, Wengang Wang wrote: Use __vmalloc to allocate memory for mlx4_ib_wq.wrid and mlx4_ib_srq.wrid. Several hits that the kmalloc for wrid failed with the following like call back stack: Using vmalloc and friends should be done

[PATCH] mlx4: vmalloc for mlx4_ib_wq.wrid and mlx4_ib_srq.wrid

2015-09-23 Thread Wengang Wang
) 0*2048kB 0*4096kB = 129944kB I also hit same errors order 3. Signed-off-by: Wengang Wang --- drivers/infiniband/hw/mlx4/qp.c | 15 +-- drivers/infiniband/hw/mlx4/srq.c | 6 -- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/drivers/infiniband/hw/mlx4/qp.c b

Re: [PATCH] rds: rds_ib_device.refcount overflow

2015-07-29 Thread Wengang Wang
Doug, No problem. I found the patch picked up. thanks, wengang 在 2015年07月29日 22:36, Doug Ledford 写道: On 07/12/2015 09:18 PM, Wengang Wang wrote: Hi Doug, How do you think about this patch? Sorry, I picked this up already. I must have missed sending out the acknowledgment on this one

Re: [PATCH] rds: rds_ib_device.refcount overflow

2015-07-12 Thread Wengang Wang
Hi Doug, How do you think about this patch? thanks, wengang 在 2015年07月06日 14:35, Wengang Wang 写道: Fixes: 3e0249f9c05c ("RDS/IB: add refcount tracking to struct rds_ib_device") There lacks a dropping on rds_ib_device.refcount in case rds_ib_alloc_fmr failed(mr pool running out). th

[PATCH] rds: rds_ib_device.refcount overflow

2015-07-05 Thread Wengang Wang
refcount) <= 0); 118 if (atomic_dec_and_test(&rds_ibdev->refcount)) 119 queue_work(rds_wq, &rds_ibdev->free_work); 120 } fix is to drop refcount when rds_ib_alloc_fmr failed. Signed-off-by: Wengang Wang Reviewed-by: Haggai Eran --- net/rds/ib_rdma.c | 4 +++

Re: [PATCH] rds: rds_ib_device.refcount overflow

2015-07-05 Thread Wengang Wang
Haggai, Thanks for review! I will add the message you suggested and re-post. thanks, wengang 在 2015年07月06日 14:18, Haggai Eran 写道: On 24/06/2015 07:54, Wengang Wang wrote: There lacks a dropping on rds_ib_device.refcount in case rds_ib_alloc_fmr failed(mr pool running out). this lead to the

Re: [PATCH] rds: rds_ib_device.refcount overflow

2015-07-05 Thread Wengang Wang
Hi Doug, Could you please review this patch? thanks, wengang 在 2015年06月24日 12:54, Wengang Wang 写道: There lacks a dropping on rds_ib_device.refcount in case rds_ib_alloc_fmr failed(mr pool running out). this lead to the refcount overflow. A complain in line 117(see following) is seen. From

[PATCH] rds: rds_ib_device.refcount overflow

2015-06-23 Thread Wengang Wang
v->refcount)) 119 queue_work(rds_wq, &rds_ibdev->free_work); 120 } fix is to drop refcount when rds_ib_alloc_fmr failed. Signed-off-by: Wengang Wang --- net/rds/ib_rdma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/rds/ib_rdma.c b/net/rds/ib_rdma.c index 273b8b

Re: [PATCH] rds: re-entry of rds_ib_xmit/rds_iw_xmit

2015-05-24 Thread Wengang Wang
Hi, Could anyone review this patch please. thanks, wengang 在 2015年05月21日 13:11, Wengang Wang 写道: The BUG_ON at line 452/453 is triggered in function rds_send_xmit. 441 while (ret) { 442 tmp = min_t(int, ret, sg->length -

[PATCH] rds: re-entry of rds_ib_xmit/rds_iw_xmit

2015-05-20 Thread Wengang Wang
slots. the same applies to rds_iw_xmit too. Signed-off-by: Wengang Wang --- net/rds/ib_send.c | 17 +++-- net/rds/iw_send.c | 18 +++--- net/rds/rds.h | 2 ++ 3 files changed, 24 insertions(+), 13 deletions(-) diff --git a/net/rds/ib_send.c b/net/rds/ib_send.c index bd

[PATCH] bonding: move ipoib_header_ops to vmlinux

2014-12-29 Thread Wengang Wang
ld point to invalid address. Accessing it will cause problem. This patch tries to fix this issue by moving ipoib_header_ops to vmlinux to keep it valid even when ipoib module is unloaded. Signed-off-by: Wengang Wang --- drivers/infiniband/ulp/ipoib/ipoib.h | 10 - drivers/infiniband/u

Re: [PATCH] bonding: move ipoib_header_ops to vmlinux

2014-12-02 Thread Wengang Wang
Hi David and Jay, Then about about the change in this patch? thanks, wengang 在 2014年11月26日 09:30, Wengang 写道: 于 2014年11月26日 02:44, David Miller 写道: From: Jay Vosburgh Date: Tue, 25 Nov 2014 10:41:17 -0800 Or Gerlitz wrote: On 11/25/2014 8:07 AM, David Miller wrote: IPOIB should not wor

[PATCH] bonding: move ipoib_header_ops to vmlinux

2014-11-24 Thread Wengang Wang
ld point to invalid address. Accessing it will cause problem. This patch tries to fix this issue by moving ipoib_header_ops to vmlinux to keep it valid even when ipoib module is unloaded. Signed-off-by: Wengang Wang --- drivers/infiniband/ulp/ipoib/ipoib.h | 10 - drivers/infiniband/u