On Fri, Oct 20, 2017 at 6:21 PM, Andrei Vagin wrote:
> On Fri, Oct 20, 2017 at 05:06:47PM +0100, Gargi Sharma wrote:
>> On Thu, Oct 19, 2017 at 5:18 PM, Oleg Nesterov wrote:
>> > On 10/19, Andrei Vagin wrote:
>> >>
>> >> Hi Gargi,
>> >>
>
On Thu, Oct 19, 2017 at 5:18 PM, Oleg Nesterov wrote:
> On 10/19, Andrei Vagin wrote:
>>
>> Hi Gargi,
>>
>> This patch breaks CRIU, because it changes a meaning of ns_last_pid.
>
> ...
>
>> > @@ -311,7 +297,7 @@ static int pid_ns_ctl_handler(struct ctl_table *table,
>> > int write,
>> > * it
t-20171018 #1 SMP Wed Oct 18 23:52:43 PDT 2017
> x86_64 x86_64 x86_64 GNU/Linux
> $ echo 1 > /proc/sys/kernel/ns_last_pid && sh -c 'echo $$'
> 1
>
> Thanks,
> Andrei
>
> On Wed, Oct 11, 2017 at 06:19:38PM -0400, Gargi Sharma wrote:
>> T
complex by
replacing custom code with calls to generic API.
Signed-off-by: Gargi Sharma
---
arch/powerpc/platforms/cell/spufs/sched.c | 2 +-
fs/proc/loadavg.c | 2 +-
include/linux/pid_namespace.h | 14 +--
init/main.c | 2
: Gargi Sharma
---
arch/ia64/kernel/asm-offsets.c | 4 ++--
include/linux/init_task.h | 1 -
include/linux/pid.h| 2 --
include/linux/pid_namespace.h | 4 ++--
init/main.c| 1 -
kernel/fork.c | 2 +-
kernel/pid.c | 48
Used idr_for_each_entry_continue()
- Used idr_find() to lookup pids
Gargi Sharma (2):
pid: Replace pid bitmap implementation with IDR API
pid: Remove pidhash
arch/ia64/kernel/asm-offsets.c| 4 +-
arch/powerpc/platforms/cell/spufs/sched.c | 2 +-
fs/proc/load
in v2:
- Removed redundant IDR function that was introduced
in the previous patchset.
- Renamed PIDNS_HASH_ADDING
- Used idr_for_each_entry_continue()
- Used idr_find() to lookup pids
Gargi Sharma (2):
pid: Replace pid bitmap implementation with IDR API
complex by
replacing custom code with calls to generic API.
Signed-off-by: Gargi Sharma
---
arch/powerpc/platforms/cell/spufs/sched.c | 2 +-
fs/proc/loadavg.c | 2 +-
include/linux/pid_namespace.h | 14 +--
init/main.c | 2
: Gargi Sharma
---
include/linux/init_task.h | 1 -
include/linux/pid.h | 2 --
include/linux/pid_namespace.h | 4 ++--
init/main.c | 1 -
kernel/fork.c | 2 +-
kernel/pid.c | 48 +--
kernel
On Tue, Oct 10, 2017 at 4:46 PM, Rik van Riel wrote:
> On Tue, 2017-10-10 at 13:35 +0100, Gargi Sharma wrote:
>> On Tue, Oct 10, 2017 at 12:50 PM, Oleg Nesterov
>> wrote:
>> > On 10/09, Andrew Morton wrote:
>> > >
>> > > > @@
On Tue, Oct 10, 2017 at 12:50 PM, Oleg Nesterov wrote:
> On 10/09, Andrew Morton wrote:
>>
>> > @@ -240,17 +230,11 @@ void zap_pid_ns_processes(struct pid_namespace
>> > *pid_ns)
>> > *
>> > */
>> > read_lock(&tasklist_lock);
>> > - nr = next_pidmap(pid_ns, 1);
>> > - while (nr
: Gargi Sharma
---
include/linux/init_task.h | 1 -
include/linux/pid.h | 2 --
include/linux/pid_namespace.h | 4 ++--
init/main.c | 1 -
kernel/fork.c | 2 +-
kernel/pid.c | 48 +--
kernel
complex by
replacing custom code with calls to generic API.
Signed-off-by: Gargi Sharma
---
arch/powerpc/platforms/cell/spufs/sched.c | 2 +-
fs/proc/loadavg.c | 2 +-
include/linux/pid_namespace.h | 14 +--
init/main.c | 2
chset.
- Renamed PIDNS_HASH_ADDING
- Used idr_for_each_entry_continue()
- Used idr_find() to lookup pids
Gargi Sharma (2):
pid: Replace pid bitmap implementation with IDR API
pid: Remove pidhash
arch/powerpc/platforms/cell/spufs/sched.c | 2 +-
fs/proc/load
: Gargi Sharma
---
include/linux/init_task.h | 1 -
include/linux/pid.h | 2 --
include/linux/pid_namespace.h | 4 ++--
init/main.c | 1 -
kernel/fork.c | 2 +-
kernel/pid.c | 48 +--
kernel
complex by
replacing custom code with calls to generic API.
Signed-off-by: Gargi Sharma
---
arch/powerpc/platforms/cell/spufs/sched.c | 2 +-
fs/proc/loadavg.c | 2 +-
include/linux/pid_namespace.h | 14 +--
init/main.c | 2
Used idr_for_each_entry_continue()
- Used idr_find() to lookup pids
Gargi Sharma (2):
pid: Replace pid bitmap implementation with IDR API
pid: Remove pidhash
arch/powerpc/platforms/cell/spufs/sched.c | 2 +-
fs/proc/loadavg.c | 2 +-
include/linux/init_t
On Tue, Oct 3, 2017 at 9:45 PM, Oleg Nesterov wrote:
> On 10/02, Andrew Morton wrote:
>>
>> From: Alexey Dobriyan
>> Subject: pid: delete struct pidmap::nr_free
>>
>> There is a check in pid allocation code to skip a full page:
>>
>> if (likely(atomic_read(&map->nr_free))) {
>>
On Mon, Oct 2, 2017 at 8:52 PM, Rik van Riel wrote:
> On Mon, 2017-10-02 at 17:21 +0200, Oleg Nesterov wrote:
>> Hi Rik,
>>
>> On 10/02, Rik van Riel wrote:
>> >
>> > Gargi and I are looking at that code, and trying to figure out
>> > exactly what needs to be done to make all of this correct.
>>
>
On Sun, Oct 1, 2017 at 2:45 PM, Christoph Hellwig wrote:
>> - task_active_pid_ns(current)->last_pid);
>> + task_active_pid_ns(current)->idr.idr_next-1);
>
> I think we want a well documented helper for this pattern instead
> of poking into the internals.
idr_get_cursor() ge
>
> And I just noticed you didn't cc Eric Biederman ,
> please do next time.
Sorry for missing out on this. Will do with the next version.
Thanks!
Gargi
>
>
> On 09/27, Oleg Nesterov wrote:
>>
>> On 09/27, Gargi Sharma wrote:
>> >
>> > -#defi
On Thu, Sep 28, 2017 at 3:46 PM, Rik van Riel wrote:
> On Fri, 2017-09-29 at 01:09 +0530, Gargi Sharma wrote:
>
>> 1000 processes that just sleep and sit around without doing
>> anything(100 second sleep and then exit).
>>
>> pstree with 10,000 processes
>>
On Wed, Sep 27, 2017 at 6:39 PM, Rik van Riel wrote:
> On Wed, 2017-09-27 at 01:06 -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(), all
On Wed, Sep 27, 2017 at 7:36 PM, Oleg Nesterov wrote:
> On 09/27, Rik van Riel wrote:
>>
>> > @@ -240,17 +230,18 @@ void zap_pid_ns_processes(struct pid_namespace
>> > *pid_ns)
>> > *
>> > */
>> > read_lock(&tasklist_lock);
>> > - nr = next_pidmap(pid_ns, 1);
>> > - while (nr > 0
: Gargi Sharma
Reviewed-by: Rik van Riel
---
include/linux/init_task.h | 1 -
include/linux/pid.h | 2 --
include/linux/pid_namespace.h | 4 ++--
init/main.c | 1 -
kernel/fork.c | 2 +-
kernel/pid.c | 52
complex by
replacing custom code with calls to generic API.
Signed-off-by: Gargi Sharma
---
arch/powerpc/platforms/cell/spufs/sched.c | 2 +-
fs/proc/loadavg.c | 2 +-
include/linux/pid_namespace.h | 14 +--
init/main.c | 2
DDING
- Used idr_for_each_entry_continue()
- Used idr_find() to lookup pids
Gargi Sharma (2):
pid: Replace pid bitmap implementation with IDR API
pid: Remove pidhash
arch/powerpc/platforms/cell/spufs/sched.c | 2 +-
fs/proc/loadavg.c | 2 +-
include/
On Mon, Sep 25, 2017 at 6:50 PM, Rik van Riel wrote:
> On Mon, 2017-09-25 at 08:56 -0400, Gargi Sharma wrote:
>> pidhash is no longer required as all the functionalities
>> are present in the idr tree associated with the namespace.
>> nr can be looked up in the
On Mon, Sep 25, 2017 at 7:42 PM, Oleg Nesterov wrote:
> On 09/25, Gargi Sharma wrote:
>>
>> idr_get(namespace, id) returns a NULL if id is not present
>> in the idr tree or returns the pointer to the struct if id is
>> present in the idr tree. With this function in t
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(&pidmap_loc
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
.
Signed-off-by: Gargi Sharma
---
include/linux/idr.h | 1 +
lib/idr.c | 11 +++
2 files changed, 12 insertions(+)
diff --git a/include/linux/idr.h b/include/linux/idr.h
index 7c3a365..e12b174 100644
--- a/include/linux/idr.h
+++ b/include/linux/idr.h
@@ -135,6 +135,7 @@ int
pidhash is no longer required as all the information
can be looked up from idr tree. Also, nr_hashed represented
the number of pids that had been hashed. Since, nr_hashed is
no longer relevant, it has been renamed to pid_allocated.
Signed-off-by: Gargi Sharma
---
include/linux/init_task.h
pidhash is no longer required as all the functionalities
are present in the idr tree associated with the namespace.
nr can be looked up in the namespace by idr_get().
Signed-off-by: Gargi Sharma
---
kernel/pid.c | 10 +-
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a
complex by
replacing custom code with calls to generic API.
Signed-off-by: Gargi Sharma
---
arch/powerpc/platforms/cell/spufs/sched.c | 2 +-
fs/proc/loadavg.c | 2 +-
include/linux/pid_namespace.h | 14 +--
init/main.c | 2
d for
allocation of PIDs to the processes. The IDR implementation is a little faster
than bitmap implementation.
Gargi Sharma (4):
pid: Replace pid bitmap implementation with IDR API
idr: Add a function idr_get()
pid.c: Replace pidhash lookup with idr_get()
pid: Remove pidhash
arch/po
complex by
replacing custom code with calls to generic API.
Signed-off-by: Gargi Sharma
---
include/linux/pid.h | 1 +
include/linux/pid_namespace.h | 5 +-
init/main.c | 4 +-
kernel/pid.c | 204 --
kernel
d for
allocation of PIDs to the processes. The IDR implementation is a little faster
than bitmap implementation.
The next change in the pipeline is replacing pidhash with IDR API
implementation.
Gargi Sharma (2):
proc: Return if nothing to unmount
pid: Replace PID bitmap implementation with ID
If a task exits before procfs is mounted, proc_flush_task_mnt will
be called with a NULL mnt parameter. In that case, not only is there
nothing to unhash, but trying to do so will oops the kernel with a
null pointer dereference.
Signed-off-by: Gargi Sharma
---
fs/proc/base.c | 4
1 file
On Mon, Mar 13, 2017 at 5:30 PM, Lars-Peter Clausen wrote:
> On 03/12/2017 02:32 PM, simran singhal wrote:
>> The IIO subsystem is redefining iio_dev->mlock to be used by
>> the IIO core only for protecting device operating mode changes.
>> ie. Changes between INDIO_DIRECT_MODE, INDIO_BUFFER_* mod
On Sun, Mar 19, 2017 at 6:20 PM, simran singhal
wrote:
> The IIO subsystem is redefining iio_dev->mlock to be used by
> the IIO core only for protecting device operating mode changes.
> ie. Changes between INDIO_DIRECT_MODE, INDIO_BUFFER_* modes.
>
> In this driver, mlock was being used to protect
On Sun, Mar 19, 2017 at 4:01 PM, Jonathan Cameron wrote:
> On 17/03/17 09:32, Gargi Sharma wrote:
>> On Mon, Mar 13, 2017 at 5:30 PM, Lars-Peter Clausen wrote:
>>>
>>> On 03/12/2017 02:32 PM, simran singhal wrote:
>>>> The IIO subsystem is redefining ii
On Mon, Mar 13, 2017 at 5:30 PM, Lars-Peter Clausen wrote:
>
> On 03/12/2017 02:32 PM, simran singhal wrote:
> > The IIO subsystem is redefining iio_dev->mlock to be used by
> > the IIO core only for protecting device operating mode changes.
> > ie. Changes between INDIO_DIRECT_MODE, INDIO_BUFFER_
43 matches
Mail list logo