Re: [PATCH] net/packet: simply allocations in alloc_one_pg_vec_page

2020-05-16 Thread Shakeel Butt
On Sat, May 16, 2020 at 4:39 PM David Miller wrote: > > From: Shakeel Butt > Date: Sat, 16 May 2020 15:35:46 -0700 > > > So, my argument is if non-zero order vzalloc has failed (allocations > > internal to vzalloc, including virtual mapping allocation and page > > table allocations, are order 0

Re: [PATCH] net/packet: simply allocations in alloc_one_pg_vec_page

2020-05-16 Thread Shakeel Butt
On Sat, May 16, 2020 at 3:45 PM Eric Dumazet wrote: > > On Sat, May 16, 2020 at 3:35 PM Shakeel Butt wrote: > > > > On Sat, May 16, 2020 at 1:40 PM David Miller wrote: > > > > > > From: Shakeel Butt > > > Date: Fri, 15 May 2020 19:17:36 -0700 > > > > > > > and thus there is no need to have any

Re: [PATCH] net/packet: simply allocations in alloc_one_pg_vec_page

2020-05-16 Thread David Miller
From: Shakeel Butt Date: Sat, 16 May 2020 15:35:46 -0700 > So, my argument is if non-zero order vzalloc has failed (allocations > internal to vzalloc, including virtual mapping allocation and page > table allocations, are order 0 and use GFP_KERNEL i.e. triggering > reclaim and oom-killer) then

Re: [PATCH] net/packet: simply allocations in alloc_one_pg_vec_page

2020-05-16 Thread Eric Dumazet
On Sat, May 16, 2020 at 3:35 PM Shakeel Butt wrote: > > On Sat, May 16, 2020 at 1:40 PM David Miller wrote: > > > > From: Shakeel Butt > > Date: Fri, 15 May 2020 19:17:36 -0700 > > > > > and thus there is no need to have any fallback after vzalloc. > > > > This statement is false. > > > > The

Re: [PATCH] net/packet: simply allocations in alloc_one_pg_vec_page

2020-05-16 Thread Shakeel Butt
On Sat, May 16, 2020 at 1:40 PM David Miller wrote: > > From: Shakeel Butt > Date: Fri, 15 May 2020 19:17:36 -0700 > > > and thus there is no need to have any fallback after vzalloc. > > This statement is false. > > The virtual mapping allocation or the page table allocations can fail. > > A

Re: [PATCH] net/packet: simply allocations in alloc_one_pg_vec_page

2020-05-16 Thread David Miller
From: Shakeel Butt Date: Fri, 15 May 2020 19:17:36 -0700 > and thus there is no need to have any fallback after vzalloc. This statement is false. The virtual mapping allocation or the page table allocations can fail. A fallback is therefore indeed necessary.

[PATCH] net/packet: simply allocations in alloc_one_pg_vec_page

2020-05-15 Thread Shakeel Butt
Currently the initial allocation for pg_vec buffers are done through page allocator with __GFP_NORETRY, the first fallbacks is vzalloc and the second fallback is page allocator without __GFP_NORETRY. First, there is no need to do vzalloc if the order is 0 and second the vzalloc internally use