Re: [PATCH 2/2] mm: avoid unnecessary swap_info_struct allocation

2018-11-05 Thread Vasily Averin
I was wrong, openVz blocks sys_swapon/swapoff syscalls inside containers. Our kernel just emulates /proc/swaps output inside containers, it is enough for 'swapon' userspace to do not fail and show required info. So I do not have any special arguments for proposed patch. On 11/5/18 8:19 AM, Vasily

Re: [PATCH 2/2] mm: avoid unnecessary swap_info_struct allocation

2018-11-04 Thread Vasily Averin
On 11/5/18 3:57 AM, Huang, Ying wrote: > Vasily Averin writes: > >> Currently newly allocated swap_info_struct can be quickly freed. >> This patch avoid uneccessary high-order page allocation and helps >> to decrease the memory pressure. > > I think swapon/swapoff are rare operations, so it will

Re: [PATCH 2/2] mm: avoid unnecessary swap_info_struct allocation

2018-11-04 Thread Huang, Ying
Vasily Averin writes: > Currently newly allocated swap_info_struct can be quickly freed. > This patch avoid uneccessary high-order page allocation and helps > to decrease the memory pressure. I think swapon/swapoff are rare operations, so it will not increase the memory pressure much. Best Re

[PATCH 2/2] mm: avoid unnecessary swap_info_struct allocation

2018-11-04 Thread Vasily Averin
Currently newly allocated swap_info_struct can be quickly freed. This patch avoid uneccessary high-order page allocation and helps to decrease the memory pressure. Signed-off-by: Vasily Averin --- mm/swapfile.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git