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

2018-06-04 Thread Michal Hocko
On Thu 31-05-18 11:10:22, Michal Hocko wrote: > On Thu 31-05-18 10:55:32, Michal Hocko wrote: > > On Thu 31-05-18 04:35:31, Eric Dumazet wrote: > [...] > > > I merely copied/pasted from alloc_skb_with_frags() :/ > > > > I will have a look at it. Thanks! > > OK, so this is an example of an

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

2018-06-04 Thread Michal Hocko
On Thu 31-05-18 11:10:22, Michal Hocko wrote: > On Thu 31-05-18 10:55:32, Michal Hocko wrote: > > On Thu 31-05-18 04:35:31, Eric Dumazet wrote: > [...] > > > I merely copied/pasted from alloc_skb_with_frags() :/ > > > > I will have a look at it. Thanks! > > OK, so this is an example of an

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

2018-05-31 Thread Qing Huang
On 5/31/2018 2:10 AM, Michal Hocko wrote: On Thu 31-05-18 10:55:32, Michal Hocko wrote: On Thu 31-05-18 04:35:31, Eric Dumazet wrote: [...] I merely copied/pasted from alloc_skb_with_frags() :/ I will have a look at it. Thanks! OK, so this is an example of an incremental development ;).

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

2018-05-31 Thread Qing Huang
On 5/31/2018 2:10 AM, Michal Hocko wrote: On Thu 31-05-18 10:55:32, Michal Hocko wrote: On Thu 31-05-18 04:35:31, Eric Dumazet wrote: [...] I merely copied/pasted from alloc_skb_with_frags() :/ I will have a look at it. Thanks! OK, so this is an example of an incremental development ;).

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

2018-05-29 Thread Eric Dumazet
On 05/29/2018 11:44 PM, Eric Dumazet wrote: > > And I will add this simple fix, this really should address your initial > concern much better. > > @@ -99,6 +100,8 @@ static int mlx4_alloc_icm_pages(struct scatterlist *mem, > int order, > { > struct page *page; > > + if

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

2018-05-29 Thread Eric Dumazet
On 05/29/2018 11:44 PM, Eric Dumazet wrote: > > And I will add this simple fix, this really should address your initial > concern much better. > > @@ -99,6 +100,8 @@ static int mlx4_alloc_icm_pages(struct scatterlist *mem, > int order, > { > struct page *page; > > + if

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

2018-05-29 Thread Eric Dumazet
On 05/29/2018 11:34 PM, Eric Dumazet wrote: > I will test : > > diff --git a/drivers/net/ethernet/mellanox/mlx4/icm.c > b/drivers/net/ethernet/mellanox/mlx4/icm.c > index > 685337d58276fc91baeeb64387c52985e1bc6dda..4d2a71381acb739585d662175e86caef72338097 > 100644 > ---

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

2018-05-29 Thread Eric Dumazet
On 05/29/2018 11:34 PM, Eric Dumazet wrote: > I will test : > > diff --git a/drivers/net/ethernet/mellanox/mlx4/icm.c > b/drivers/net/ethernet/mellanox/mlx4/icm.c > index > 685337d58276fc91baeeb64387c52985e1bc6dda..4d2a71381acb739585d662175e86caef72338097 > 100644 > ---

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

2018-05-29 Thread Eric Dumazet
On 05/25/2018 10:23 AM, David Miller wrote: > From: Qing Huang > Date: Wed, 23 May 2018 16:22:46 -0700 > >> 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

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

2018-05-29 Thread Eric Dumazet
On 05/25/2018 10:23 AM, David Miller wrote: > From: Qing Huang > Date: Wed, 23 May 2018 16:22:46 -0700 > >> 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

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

2018-05-25 Thread David Miller
From: Qing Huang Date: Wed, 23 May 2018 16:22:46 -0700 > 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

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

2018-05-25 Thread David Miller
From: Qing Huang Date: Wed, 23 May 2018 16:22:46 -0700 > 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 order to complete high

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

2018-05-24 Thread Tariq Toukan
On 24/05/2018 2:22 AM, 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 order to complete high order memory

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

2018-05-24 Thread Tariq Toukan
On 24/05/2018 2:22 AM, 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 order to complete high order memory

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

2018-05-24 Thread Gi-Oh Kim
On Thu, May 24, 2018 at 1:22 AM, 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 order

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

2018-05-24 Thread Gi-Oh Kim
On Thu, May 24, 2018 at 1:22 AM, 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 order to complete high order

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

2018-05-23 Thread Qing Huang
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 order to complete high order memory allocations. When that happens, user processes

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

2018-05-23 Thread Qing Huang
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 order to complete high order memory allocations. When that happens, user processes