Re: [PATCH -v2 1/2] mm, swap: Use kvzalloc to allocate some swap data structure

2017-04-05 Thread Vlastimil Babka
On 03/24/2017 02:56 PM, Dave Hansen wrote: > On 03/24/2017 12:33 AM, John Hubbard wrote: >> There might be some additional information you are using to come up with >> that conclusion, that is not obvious to me. Any thoughts there? These >> calls use the same underlying page allocator (and I though

Re: [PATCH -v2 1/2] mm, swap: Use kvzalloc to allocate some swap data structure

2017-04-04 Thread Huang, Ying
Michal Hocko writes: > On Sat 01-04-17 12:47:56, Huang, Ying wrote: >> Hi, Michal, >> >> Michal Hocko writes: >> >> > On Fri 24-03-17 06:56:10, Dave Hansen wrote: >> >> On 03/24/2017 12:33 AM, John Hubbard wrote: >> >> > There might be some additional information you are using to come up with

Re: [PATCH -v2 1/2] mm, swap: Use kvzalloc to allocate some swap data structure

2017-04-03 Thread Michal Hocko
On Sat 01-04-17 12:47:56, Huang, Ying wrote: > Hi, Michal, > > Michal Hocko writes: > > > On Fri 24-03-17 06:56:10, Dave Hansen wrote: > >> On 03/24/2017 12:33 AM, John Hubbard wrote: > >> > There might be some additional information you are using to come up with > >> > that conclusion, that is

Re: [PATCH -v2 1/2] mm, swap: Use kvzalloc to allocate some swap data structure

2017-03-31 Thread Huang, Ying
Hi, Michal, Michal Hocko writes: > On Fri 24-03-17 06:56:10, Dave Hansen wrote: >> On 03/24/2017 12:33 AM, John Hubbard wrote: >> > There might be some additional information you are using to come up with >> > that conclusion, that is not obvious to me. Any thoughts there? These >> > calls use t

Re: [PATCH -v2 1/2] mm, swap: Use kvzalloc to allocate some swap data structure

2017-03-30 Thread Michal Hocko
On Fri 24-03-17 06:56:10, Dave Hansen wrote: > On 03/24/2017 12:33 AM, John Hubbard wrote: > > There might be some additional information you are using to come up with > > that conclusion, that is not obvious to me. Any thoughts there? These > > calls use the same underlying page allocator (and I t

Re: [PATCH -v2 1/2] mm, swap: Use kvzalloc to allocate some swap data structure

2017-03-24 Thread John Hubbard
On 03/24/2017 09:52 AM, Tim Chen wrote: On Fri, 2017-03-24 at 06:56 -0700, Dave Hansen wrote: On 03/24/2017 12:33 AM, John Hubbard wrote: There might be some additional information you are using to come up with that conclusion, that is not obvious to me. Any thoughts there? These calls use the

Re: [PATCH -v2 1/2] mm, swap: Use kvzalloc to allocate some swap data structure

2017-03-24 Thread Tim Chen
On Fri, 2017-03-24 at 06:56 -0700, Dave Hansen wrote: > On 03/24/2017 12:33 AM, John Hubbard wrote: > > > > There might be some additional information you are using to come up with > > that conclusion, that is not obvious to me. Any thoughts there? These > > calls use the same underlying page allo

Re: [PATCH -v2 1/2] mm, swap: Use kvzalloc to allocate some swap data structure

2017-03-24 Thread Dave Hansen
On 03/24/2017 12:33 AM, John Hubbard wrote: > There might be some additional information you are using to come up with > that conclusion, that is not obvious to me. Any thoughts there? These > calls use the same underlying page allocator (and I thought that both > were subject to the same constrain

Re: [PATCH -v2 1/2] mm, swap: Use kvzalloc to allocate some swap data structure

2017-03-24 Thread John Hubbard
[...] Hi Ying, I'm a little surprised to see vmalloc calls replaced with kmalloc-then-vmalloc calls, because that actually makes fragmentation worse (contrary to the above claim). That's because you will consume contiguous memory (even though you don't need it to be contiguous), whereas before,

Re: [PATCH -v2 1/2] mm, swap: Use kvzalloc to allocate some swap data structure

2017-03-24 Thread Huang, Ying
John Hubbard writes: > On 03/23/2017 09:52 PM, Huang, Ying wrote: >> John Hubbard writes: >> >>> On 03/23/2017 07:41 PM, Huang, Ying wrote: David Rientjes writes: > On Mon, 20 Mar 2017, Huang, Ying wrote: > >> From: Huang Ying >> >> Now vzalloc() is used in swap c

Re: [PATCH -v2 1/2] mm, swap: Use kvzalloc to allocate some swap data structure

2017-03-23 Thread John Hubbard
On 03/23/2017 09:52 PM, Huang, Ying wrote: John Hubbard writes: On 03/23/2017 07:41 PM, Huang, Ying wrote: David Rientjes writes: On Mon, 20 Mar 2017, Huang, Ying wrote: From: Huang Ying Now vzalloc() is used in swap code to allocate various data structures, such as swap cache, swap sl

Re: [PATCH -v2 1/2] mm, swap: Use kvzalloc to allocate some swap data structure

2017-03-23 Thread Huang, Ying
John Hubbard writes: > On 03/23/2017 07:41 PM, Huang, Ying wrote: >> David Rientjes writes: >> >>> On Mon, 20 Mar 2017, Huang, Ying wrote: >>> From: Huang Ying Now vzalloc() is used in swap code to allocate various data structures, such as swap cache, swap slots cache, clust

Re: [PATCH -v2 1/2] mm, swap: Use kvzalloc to allocate some swap data structure

2017-03-23 Thread John Hubbard
On 03/23/2017 07:41 PM, Huang, Ying wrote: David Rientjes writes: On Mon, 20 Mar 2017, Huang, Ying wrote: From: Huang Ying Now vzalloc() is used in swap code to allocate various data structures, such as swap cache, swap slots cache, cluster info, etc. Because the size may be too large on s

Re: [PATCH -v2 1/2] mm, swap: Use kvzalloc to allocate some swap data structure

2017-03-23 Thread Huang, Ying
David Rientjes writes: > On Mon, 20 Mar 2017, Huang, Ying wrote: > >> From: Huang Ying >> >> Now vzalloc() is used in swap code to allocate various data >> structures, such as swap cache, swap slots cache, cluster info, etc. >> Because the size may be too large on some system, so that normal >>

Re: [PATCH -v2 1/2] mm, swap: Use kvzalloc to allocate some swap data structure

2017-03-20 Thread David Rientjes
On Mon, 20 Mar 2017, Huang, Ying wrote: > From: Huang Ying > > Now vzalloc() is used in swap code to allocate various data > structures, such as swap cache, swap slots cache, cluster info, etc. > Because the size may be too large on some system, so that normal > kzalloc() may fail. But using kz

[PATCH -v2 1/2] mm, swap: Use kvzalloc to allocate some swap data structure

2017-03-20 Thread Huang, Ying
From: Huang Ying Now vzalloc() is used in swap code to allocate various data structures, such as swap cache, swap slots cache, cluster info, etc. Because the size may be too large on some system, so that normal kzalloc() may fail. But using kzalloc() has some advantages, for example, less memory