Re: [PATCH v2 1/2] fork: free vmapped stacks in cache when cpus are offline

2017-02-09 Thread Hoeun Ryu
On Thu, Feb 9, 2017 at 5:38 PM, Michal Hocko wrote: > On Thu 09-02-17 13:03:46, Hoeun Ryu wrote: >> Using virtually mapped stack, kernel stacks are allocated via vmalloc. >> In the current implementation, two stacks per cpu can be cached when >> tasks are freed and the cached stacks are used agai

Re: [kernel-hardening] [PATCH v2 1/2] fork: free vmapped stacks in cache when cpus are offline

2017-02-09 Thread Hoeun Ryu
On Thu, Feb 9, 2017 at 1:22 PM, Eric Biggers wrote: > Hi Hoeun, > > On Thu, Feb 09, 2017 at 01:03:46PM +0900, Hoeun Ryu wrote: >> +static int free_vm_stack_cache(unsigned int cpu) >> +{ >> + int i; >> + >> + for (i = 0; i < NR_CACHED_STACKS; i++) { >> + struct vm_struct *vm_sta

Re: [PATCH v2 1/2] fork: free vmapped stacks in cache when cpus are offline

2017-02-09 Thread kbuild test robot
Hi Hoeun, [auto build test WARNING on next-20170208] [also build test WARNING on v4.10-rc7] [cannot apply to linus/master linux/master v4.9-rc8 v4.9-rc7 v4.9-rc6] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-c

Re: [PATCH v2 1/2] fork: free vmapped stacks in cache when cpus are offline

2017-02-09 Thread Michal Hocko
On Thu 09-02-17 13:03:46, Hoeun Ryu wrote: > Using virtually mapped stack, kernel stacks are allocated via vmalloc. > In the current implementation, two stacks per cpu can be cached when > tasks are freed and the cached stacks are used again in task duplications. > but the cached stacks may remain

Re: [PATCH v2 1/2] fork: free vmapped stacks in cache when cpus are offline

2017-02-09 Thread kbuild test robot
Hi Hoeun, [auto build test WARNING on next-20170208] [also build test WARNING on v4.10-rc7] [cannot apply to linus/master linux/master v4.9-rc8 v4.9-rc7 v4.9-rc6] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-c

Re: [PATCH v2 1/2] fork: free vmapped stacks in cache when cpus are offline

2017-02-08 Thread kbuild test robot
Hi Hoeun, [auto build test ERROR on next-20170208] [also build test ERROR on v4.10-rc7] [cannot apply to linus/master linux/master v4.9-rc8 v4.9-rc7 v4.9-rc6] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/li

Re: [kernel-hardening] [PATCH v2 1/2] fork: free vmapped stacks in cache when cpus are offline

2017-02-08 Thread Eric Biggers
Hi Hoeun, On Thu, Feb 09, 2017 at 01:03:46PM +0900, Hoeun Ryu wrote: > +static int free_vm_stack_cache(unsigned int cpu) > +{ > + int i; > + > + for (i = 0; i < NR_CACHED_STACKS; i++) { > + struct vm_struct *vm_stack = this_cpu_read(cached_stacks[i]); > + if (!vm_st

[PATCH v2 1/2] fork: free vmapped stacks in cache when cpus are offline

2017-02-08 Thread Hoeun Ryu
Using virtually mapped stack, kernel stacks are allocated via vmalloc. In the current implementation, two stacks per cpu can be cached when tasks are freed and the cached stacks are used again in task duplications. but the cached stacks may remain unfreed even when cpu are offline. By adding a cp