From: Eric Dumazet <eduma...@google.com> Date: Thu, 31 May 2018 05:52:24 -0700
> Commit 1383cb8103bb ("mlx4_core: allocate ICM memory in page size chunks") > brought two regressions caught in our regression suite. > > The big one is an additional cost of 256 bytes of overhead per 4096 bytes, > or 6.25 % which is unacceptable since ICM can be pretty large. > > This comes from having to allocate one struct mlx4_icm_chunk (256 bytes) > per MLX4_TABLE_CHUNK, which the buggy commit shrank to 4KB > (instead of prior 256KB) > > Note that mlx4_alloc_icm() is already able to try high order allocations > and fallback to low-order allocations under high memory pressure. > > Most of these allocations happen right after boot time, when we get > plenty of non fragmented memory, there is really no point being so > pessimistic and break huge pages into order-0 ones just for fun. > > We only have to tweak gfp_mask a bit, to help falling back faster, > without risking OOM killings. > > Second regression is an KASAN fault, that will need further investigations. > > Fixes: 1383cb8103bb ("mlx4_core: allocate ICM memory in page size chunks") > Signed-off-by: Eric Dumazet <eduma...@google.com> > Acked-by: Tariq Toukan <tar...@mellanox.com> Applied, thanks Eric.