Re: [PATCH 1/2] mm: use kvzalloc for swap_info_struct allocation

2018-11-04 Thread Aaron Lu
On Mon, Nov 05, 2018 at 07:59:13AM +0300, Vasily Averin wrote: > > > On 11/5/18 3:50 AM, Huang, Ying wrote: > > Vasily Averin writes: > > > >> commit a2468cc9bfdf ("swap: choose swap device according to numa node") > >> increased size of swap_info_struct up to 44 Kbytes, now it requires > >>

Re: [PATCH 1/2] mm: use kvzalloc for swap_info_struct allocation

2018-11-04 Thread Aaron Lu
On Mon, Nov 05, 2018 at 07:59:13AM +0300, Vasily Averin wrote: > > > On 11/5/18 3:50 AM, Huang, Ying wrote: > > Vasily Averin writes: > > > >> commit a2468cc9bfdf ("swap: choose swap device according to numa node") > >> increased size of swap_info_struct up to 44 Kbytes, now it requires > >>

Re: [PATCH 1/2] mm: use kvzalloc for swap_info_struct allocation

2018-11-04 Thread Huang, Ying
Vasily Averin writes: > On 11/5/18 3:50 AM, Huang, Ying wrote: >> Vasily Averin writes: >> >>> commit a2468cc9bfdf ("swap: choose swap device according to numa node") >>> increased size of swap_info_struct up to 44 Kbytes, now it requires >>> 4th order page. >> >> Why swap_info_struct could

Re: [PATCH 1/2] mm: use kvzalloc for swap_info_struct allocation

2018-11-04 Thread Huang, Ying
Vasily Averin writes: > On 11/5/18 3:50 AM, Huang, Ying wrote: >> Vasily Averin writes: >> >>> commit a2468cc9bfdf ("swap: choose swap device according to numa node") >>> increased size of swap_info_struct up to 44 Kbytes, now it requires >>> 4th order page. >> >> Why swap_info_struct could

Re: [PATCH 1/2] mm: use kvzalloc for swap_info_struct allocation

2018-11-04 Thread Vasily Averin
On 11/5/18 3:50 AM, Huang, Ying wrote: > Vasily Averin writes: > >> commit a2468cc9bfdf ("swap: choose swap device according to numa node") >> increased size of swap_info_struct up to 44 Kbytes, now it requires >> 4th order page. > > Why swap_info_struct could be so large? Because

Re: [PATCH 1/2] mm: use kvzalloc for swap_info_struct allocation

2018-11-04 Thread Vasily Averin
On 11/5/18 3:50 AM, Huang, Ying wrote: > Vasily Averin writes: > >> commit a2468cc9bfdf ("swap: choose swap device according to numa node") >> increased size of swap_info_struct up to 44 Kbytes, now it requires >> 4th order page. > > Why swap_info_struct could be so large? Because

Re: [PATCH 1/2] mm: use kvzalloc for swap_info_struct allocation

2018-11-04 Thread Huang, Ying
Vasily Averin writes: > commit a2468cc9bfdf ("swap: choose swap device according to numa node") > increased size of swap_info_struct up to 44 Kbytes, now it requires > 4th order page. Why swap_info_struct could be so large? Because MAX_NUMNODES could be thousands so that 'avail_lists' field

Re: [PATCH 1/2] mm: use kvzalloc for swap_info_struct allocation

2018-11-04 Thread Huang, Ying
Vasily Averin writes: > commit a2468cc9bfdf ("swap: choose swap device according to numa node") > increased size of swap_info_struct up to 44 Kbytes, now it requires > 4th order page. Why swap_info_struct could be so large? Because MAX_NUMNODES could be thousands so that 'avail_lists' field

[PATCH 1/2] mm: use kvzalloc for swap_info_struct allocation

2018-11-04 Thread Vasily Averin
commit a2468cc9bfdf ("swap: choose swap device according to numa node") increased size of swap_info_struct up to 44 Kbytes, now it requires 4th order page. Switch to kvzmalloc allows to avoid unexpected allocation failures. Signed-off-by: Vasily Averin --- mm/swapfile.c | 6 +++--- 1 file

[PATCH 1/2] mm: use kvzalloc for swap_info_struct allocation

2018-11-04 Thread Vasily Averin
commit a2468cc9bfdf ("swap: choose swap device according to numa node") increased size of swap_info_struct up to 44 Kbytes, now it requires 4th order page. Switch to kvzmalloc allows to avoid unexpected allocation failures. Signed-off-by: Vasily Averin --- mm/swapfile.c | 6 +++--- 1 file