On Fri, Jul 14, 2017 at 4:52 PM, Greg KH 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 applied, the
>> kernel compil
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
---
include/linux/pid_namespace.h | 2 +-
init
tree will be then used by
alloc_pid, free_pid and pid lookup functions to perform their respective
tasks.
Signed-off-by: Gargi Sharma
---
include/linux/pid_namespace.h | 3 ++-
kernel/pid_namespace.c| 20 +---
2 files changed, 7 insertions(+), 16 deletions(-)
diff --git
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
---
kernel/pid.c | 8 +---
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/kernel
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
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
---
kernel/pid.c | 45 -
1 file changed, 45 deletions
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
---
kernel/pid_namespace.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/kernel/pid_namespace.c b/kernel
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
---
kernel/pid.c
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
---
kernel/pid_namespace.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/kernel/pid_namespace.c b/kernel
ner should 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):
10 matches
Mail list logo