Re: [PATCH 1/4] pid: Replace pid bitmap implementation with IDR API

2017-09-25 Thread Gargi Sharma
On Mon, Sep 25, 2017 at 8:50 PM, Oleg Nesterov wrote: > On 09/25, Gargi Sharma wrote: >> >> @@ -285,10 +145,14 @@ void free_pid(struct pid *pid) >> break; >> } >> } >> - spin_unlock_irqrestore(_lock, flags); >> >> - for (i = 0; i

Re: [PATCH 1/4] pid: Replace pid bitmap implementation with IDR API

2017-09-25 Thread Gargi Sharma
On Mon, Sep 25, 2017 at 8:50 PM, Oleg Nesterov wrote: > On 09/25, Gargi Sharma wrote: >> >> @@ -285,10 +145,14 @@ void free_pid(struct pid *pid) >> break; >> } >> } >> - spin_unlock_irqrestore(_lock, flags); >> >> - for (i = 0; i <= pid->level;

Re: [PATCH 1/4] pid: Replace pid bitmap implementation with IDR API

2017-09-25 Thread Gargi Sharma
On Mon, Sep 25, 2017 at 8:29 PM, Oleg Nesterov wrote: > On 09/25, Gargi Sharma wrote: >> >> void zap_pid_ns_processes(struct pid_namespace *pid_ns) >> { >> - int nr; >> + int nr = 2; >> int rc; >> struct task_struct *task, *me = current; >> int

Re: [PATCH 1/4] pid: Replace pid bitmap implementation with IDR API

2017-09-25 Thread Gargi Sharma
On Mon, Sep 25, 2017 at 8:29 PM, Oleg Nesterov wrote: > On 09/25, Gargi Sharma wrote: >> >> void zap_pid_ns_processes(struct pid_namespace *pid_ns) >> { >> - int nr; >> + int nr = 2; >> int rc; >> struct task_struct *task, *me = current; >> int init_pids =

Re: [PATCH 1/4] pid: Replace pid bitmap implementation with IDR API

2017-09-25 Thread Oleg Nesterov
On 09/25, Gargi Sharma wrote: > > @@ -285,10 +145,14 @@ void free_pid(struct pid *pid) > break; > } > } > - spin_unlock_irqrestore(_lock, flags); > > - for (i = 0; i <= pid->level; i++) > - free_pidmap(pid->numbers + i); > + for

Re: [PATCH 1/4] pid: Replace pid bitmap implementation with IDR API

2017-09-25 Thread Oleg Nesterov
On 09/25, Gargi Sharma wrote: > > @@ -285,10 +145,14 @@ void free_pid(struct pid *pid) > break; > } > } > - spin_unlock_irqrestore(_lock, flags); > > - for (i = 0; i <= pid->level; i++) > - free_pidmap(pid->numbers + i); > + for

Re: [PATCH 1/4] pid: Replace pid bitmap implementation with IDR API

2017-09-25 Thread Oleg Nesterov
On 09/25, Gargi Sharma wrote: > > void zap_pid_ns_processes(struct pid_namespace *pid_ns) > { > - int nr; > + int nr = 2; > int rc; > struct task_struct *task, *me = current; > int init_pids = thread_group_leader(me) ? 1 : 2; > + struct pid *pid; > > /*

Re: [PATCH 1/4] pid: Replace pid bitmap implementation with IDR API

2017-09-25 Thread Oleg Nesterov
On 09/25, Gargi Sharma wrote: > > void zap_pid_ns_processes(struct pid_namespace *pid_ns) > { > - int nr; > + int nr = 2; > int rc; > struct task_struct *task, *me = current; > int init_pids = thread_group_leader(me) ? 1 : 2; > + struct pid *pid; > > /*

Re: [PATCH 1/4] pid: Replace pid bitmap implementation with IDR API

2017-09-25 Thread Rik van Riel
On Mon, 2017-09-25 at 08:56 -0400, Gargi Sharma wrote: > This patch replaces the current bitmap implemetation for > Process ID allocation. Functions that are no longer required, > for example, free_pidmap(), alloc_pidmap(), etc. are removed. > The rest of the functions are modified to use the IDR

Re: [PATCH 1/4] pid: Replace pid bitmap implementation with IDR API

2017-09-25 Thread Rik van Riel
On Mon, 2017-09-25 at 08:56 -0400, Gargi Sharma wrote: > This patch replaces the current bitmap implemetation for > Process ID allocation. Functions that are no longer required, > for example, free_pidmap(), alloc_pidmap(), etc. are removed. > The rest of the functions are modified to use the IDR

[PATCH 1/4] pid: Replace pid bitmap implementation with IDR API

2017-09-25 Thread Gargi Sharma
This patch replaces the current bitmap implemetation for Process ID allocation. Functions that are no longer required, for example, free_pidmap(), alloc_pidmap(), etc. are removed. The rest of the functions are modified to use the IDR API. The change was made to make the PID allocation less

[PATCH 1/4] pid: Replace pid bitmap implementation with IDR API

2017-09-25 Thread Gargi Sharma
This patch replaces the current bitmap implemetation for Process ID allocation. Functions that are no longer required, for example, free_pidmap(), alloc_pidmap(), etc. are removed. The rest of the functions are modified to use the IDR API. The change was made to make the PID allocation less