Re: [PATCH 0/8] PID allocation IDR implementation

2017-07-14 Thread Gargi Sharma
On Fri, Jul 14, 2017 at 4:52 PM, Greg KH <gre...@linuxfoundation.org> wrote: > On Fri, Jul 14, 2017 at 09:03:08AM +0530, Gargi Sharma wrote: >> This patchset contains patches for PID allocation. Individual patches >> in the series break the kernel. But once, the patchset is a

[PATCH 7/8] pid.c: IDR implementation for pidmap_init()

2017-07-13 Thread Gargi Sharma
This function is called by init/main.c and earlier used to allocate space to pidmap. Now idr struct for init_pid_ns is initialised and ID 0 alocated using idr_alloc_cyclic. Also deleted NULL allocation for pidmap. Signed-off-by: Gargi Sharma <gs051...@gmail.com> --- include/linux/pid_names

[PATCH 8/8] pid_namespace: IDR implementation for create_pid_namespace

2017-07-13 Thread Gargi Sharma
. This tree will be then used by alloc_pid, free_pid and pid lookup functions to perform their respective tasks. Signed-off-by: Gargi Sharma <gs051...@gmail.com> --- include/linux/pid_namespace.h | 3 ++- kernel/pid_namespace.c| 20 +--- 2 files changed, 7 insertions(

[PATCH 4/8] pid.c: Add implementation for find_ge_pid

2017-07-13 Thread Gargi Sharma
Earlier bitmap was traversed to find the pid greater or equal to nr (passed as a parameter). Now a call to idr_get_next fetches the id greater than or equal to nr. Signed-off-by: Gargi Sharma <gs051...@gmail.com> --- kernel/pid.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-)

[PATCH 5/8] pid.c: Delete free_pidmap(), alloc_pidmap(), next_pidmap()

2017-07-13 Thread Gargi Sharma
These functions are no longer used anywhere in the kernel and hance can be safely deleted. Earlier they were used for various pidmap functions, for example, next_pidmap(nr) was used to find the integer in the bitmap greater than or equal to the parameter nr. Signed-off-by: Gargi Sharma <gs

[PATCH 3/8] pid.c: Add IDR implementation for alloc_pid and free_pid

2017-07-13 Thread Gargi Sharma
the flag out_free, ids are removed from the idr entry using idr_remove function. Inside free_pid() deleting from rcu hash list is same as before. The only change is instead of removing entry from pidmap, allocated number is now deleted from the idr entry. Signed-off-by: Gargi Sharma <gs051...@gmail.

[PATCH 6/8] pid.c: Delete mk_pid(), pid_before(), set_last_pid()

2017-07-13 Thread Gargi Sharma
Delete mk_pid(), pid_before() and set_last_pid(). These functions were earlier used by alloc_pidmap(), next_pidmap() and free_pidmap() and are no longer required. Signed-off-by: Gargi Sharma <gs051...@gmail.com> --- kernel/pid.c | 45 - 1 file c

[PATCH 2/8] pid_namespace: zap_pid_ns_processes: Add IDR implementation

2017-07-13 Thread Gargi Sharma
than nr. next_pidmap() fetched the next greater id so passing 1 as a parameter worked earlier. nr is incremented inside the loop. Signed-off-by: Gargi Sharma <gs051...@gmail.com> --- kernel/pid_namespace.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/

[PATCH 1/8] pid_namespace: destroy_pid_namespace: Add IDR implementation

2017-07-13 Thread Gargi Sharma
Instead of freeing individual pages of the bitmap for the namespace, call idr_destroy() on the idr struct for the namespace. Signed-off-by: Gargi Sharma <gs051...@gmail.com> --- kernel/pid_namespace.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/

[PATCH 0/8] PID allocation IDR implementation

2017-07-13 Thread Gargi Sharma
have a separate PID namespace. I'm yet to figure out how to go about doing these tests. I also wanted to know if there would be a way to figure out if PID operations are now actually faster or not. ANy recommendations on how to go about doing this? Gargi Sharma (8): pid_namespace