Re: [PATCH v2 net] mlx4_core: restore optimal ICM memory allocation

2018-05-31 Thread Qing Huang
ons. Fixes: 1383cb8103bb ("mlx4_core: allocate ICM memory in page size chunks") Signed-off-by: Eric Dumazet Acked-by: Tariq Toukan Cc: John Sperbeck Cc: Tarick Bedeir Cc: Qing Huang Cc: Daniel Jurgens Cc: Zhu Yanjun --- drivers/net/ethernet/mellanox/mlx4/icm.c | 18 ---

Re: [PATCH net] mlx4_core: restore optimal ICM memory allocation

2018-05-30 Thread Qing Huang
On 5/30/2018 2:30 PM, Eric Dumazet wrote: On Wed, May 30, 2018 at 5:08 PM Qing Huang wrote: On 5/30/2018 1:50 PM, Eric Dumazet wrote: On Wed, May 30, 2018 at 4:30 PM Qing Huang wrote: On 5/29/2018 9:11 PM, Eric Dumazet wrote: Commit 1383cb8103bb ("mlx4_core: allocate ICM memory in

Re: [PATCH net] mlx4_core: restore optimal ICM memory allocation

2018-05-30 Thread Qing Huang
On 5/30/2018 1:50 PM, Eric Dumazet wrote: On Wed, May 30, 2018 at 4:30 PM Qing Huang wrote: On 5/29/2018 9:11 PM, Eric Dumazet wrote: Commit 1383cb8103bb ("mlx4_core: allocate ICM memory in page size chunks") brought a regression caught in our regression suite, thanks to KASAN.

Re: [PATCH net] mlx4_core: restore optimal ICM memory allocation

2018-05-30 Thread Qing Huang
c fc fc fc fc fc 8817df585000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb Fixes: 1383cb8103bb ("mlx4_core: allocate ICM memory in page size chunks") Signed-off-by: Eric Dumazet Cc: John Sperbeck Cc: Tarick Bedeir Cc: Qing Huang Cc: Daniel Jurgens Cc: Zhu Yanjun Cc: Tari

[PATCH V4] mlx4_core: allocate ICM memory in page size chunks

2018-05-23 Thread Qing Huang
for each mtt entry). So we need a 16MB allocation for a table->icm pointer array to hold 2M pointers which can easily cause kcalloc to fail. The solution is to use kvzalloc to replace kcalloc which will fall back to vmalloc automatically if kmalloc fails. Signed-off-by: Qing Huang Acked-by: Dan

Re: [PATCH v3] mlx4_core: allocate ICM memory in page size chunks

2018-05-22 Thread Qing Huang
On 5/22/2018 8:33 AM, Tariq Toukan wrote: On 18/05/2018 12:45 AM, Qing Huang wrote: On 5/17/2018 2:14 PM, Eric Dumazet wrote: On 05/17/2018 01:53 PM, Qing Huang wrote: When a system is under memory presure (high usage with fragments), the original 256KB ICM chunk allocations will likely

Re: [PATCH v3] mlx4_core: allocate ICM memory in page size chunks

2018-05-17 Thread Qing Huang
On 5/17/2018 2:14 PM, Eric Dumazet wrote: On 05/17/2018 01:53 PM, Qing Huang wrote: When a system is under memory presure (high usage with fragments), the original 256KB ICM chunk allocations will likely trigger kernel memory management to enter slow path doing memory compact/migration ops in

[PATCH v3] mlx4_core: allocate ICM memory in page size chunks

2018-05-17 Thread Qing Huang
ned-off-by: Qing Huang Acked-by: Daniel Jurgens Reviewed-by: Zhu Yanjun --- v3: use PAGE_SIZE instead of PAGE_SHIFT add comma to the end of enum variables include vmalloc.h header file to avoid build issues on Sparc v2: adjuste chunk size to reflect different architectures drivers/

Re: [PATCH V2] mlx4_core: allocate ICM memory in page size chunks

2018-05-15 Thread Qing Huang
On 5/15/2018 12:08 PM, Eric Dumazet wrote: On 05/15/2018 11:53 AM, Qing Huang wrote: This is control path so it is less latency-sensitive. Let's not produce unnecessary degradation here, please call kvzalloc so we maintain a similar behavior when contiguous memory is available,

Re: [PATCH V2] mlx4_core: allocate ICM memory in page size chunks

2018-05-15 Thread Qing Huang
On 5/15/2018 2:19 AM, Tariq Toukan wrote: On 14/05/2018 7:41 PM, Qing Huang wrote: On 5/13/2018 2:00 AM, Tariq Toukan wrote: On 11/05/2018 10:23 PM, Qing Huang wrote: When a system is under memory presure (high usage with fragments), the original 256KB ICM chunk allocations will

Re: [PATCH V2] mlx4_core: allocate ICM memory in page size chunks

2018-05-14 Thread Qing Huang
On 5/13/2018 2:00 AM, Tariq Toukan wrote: On 11/05/2018 10:23 PM, Qing Huang wrote: When a system is under memory presure (high usage with fragments), the original 256KB ICM chunk allocations will likely trigger kernel memory management to enter slow path doing memory compact/migration ops

[PATCH V2] mlx4_core: allocate ICM memory in page size chunks

2018-05-11 Thread Qing Huang
ned-off-by: Qing Huang Acked-by: Daniel Jurgens Reviewed-by: Zhu Yanjun --- v2 -> v1: adjusted chunk size to reflect different architectures. drivers/net/ethernet/mellanox/mlx4/icm.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/mellano

Re: [PATCH] mlx4_core: allocate 4KB ICM chunks

2018-05-11 Thread Qing Huang
On 5/11/2018 3:27 AM, HÃ¥kon Bugge wrote: On 11 May 2018, at 01:31, Qing Huang wrote: When a system is under memory presure (high usage with fragments), the original 256KB ICM chunk allocations will likely trigger kernel memory management to enter slow path doing memory compact/migration ops

Re: [PATCH] mlx4_core: allocate 4KB ICM chunks

2018-05-10 Thread Qing Huang
Thank you for reviewing it! On 5/10/2018 6:23 PM, Yanjun Zhu wrote: On 2018/5/11 9:15, Qing Huang wrote: On 5/10/2018 5:13 PM, Yanjun Zhu wrote: On 2018/5/11 7:31, Qing Huang wrote: When a system is under memory presure (high usage with fragments), the original 256KB ICM chunk

[PATCH] mlx4_core: allocate 4KB ICM chunks

2018-05-10 Thread Qing Huang
). So we need a 16MB allocation for a table->icm pointer array to hold 2M pointers which can easily cause kcalloc to fail. The solution is to use vzalloc to replace kcalloc. There is no need for contiguous memory pages for a driver meta data structure (no need of DMA ops). Signed-off-by: Qing Hu

Re: [PATCH] net/mlx5: report persistent netdev stats across ifdown/ifup commands

2018-04-26 Thread Qing Huang
Thanks! Looks like Eran's patch will be available much sooner than v4.18 release time frame (since v4.16 was just released). We will wait. :-) On 04/26/2018 04:43 PM, Saeed Mahameed wrote: Before you address my comments, it looks like Eran's work is converging and we will finalize the interna

Re: [PATCH] net/mlx5: report persistent netdev stats across ifdown/ifup commands

2018-04-26 Thread Qing Huang
On 04/26/2018 02:50 PM, Saeed Mahameed wrote: On Thu, Apr 26, 2018 at 1:37 PM, Qing Huang wrote: Current stats collecting scheme in mlx5 driver is to periodically fetch aggregated stats from all the active mlx5 software channels associated with the device. However when a mlx5 interface is

[PATCH] net/mlx5: report persistent netdev stats across ifdown/ifup commands

2018-04-26 Thread Qing Huang
stats into netdev stats fields, so all the accumulated stats will survive multiple runs of ifdown/ifup commands and be shown correctly. Orabug: 27548610 Signed-off-by: Qing Huang --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 30 +++ 1 file changed, 25 insertions

Re: Setting large MTU size on slave interfaces may stall the whole system

2017-12-14 Thread Qing Huang
Hi Or, On 12/13/2017 06:28 AM, Or Gerlitz wrote: On Tue, Dec 12, 2017 at 5:21 AM, Qing Huang wrote: Hi, We found an issue with the bonding driver when testing Mellanox devices. The following test commands will stall the whole system sometimes, with serial console flooded with log messages

Setting large MTU size on slave interfaces may stall the whole system

2017-12-11 Thread Qing Huang
(resend this email in text format) Hi, We found an issue with the bonding driver when testing Mellanox devices. The following test commands will stall the whole system sometimes, with serial console flooded with log messages from the bond_miimon_inspect() function. Setting mtu size to be 150