On Sun, 2017-10-01 at 16:05 +0530, Gargi Sharma wrote:
> 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 th
On Sun, 2017-10-01 at 02:15 -0700, 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.
>
> Also is last
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
> - 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.
Also is last - 1 always the correct answer? Even with idr_alloc_cyclic
we could wr
On 09/27, Gargi Sharma wrote:
>
> >
> > And make this patch correct ;)
> >
> > because currently it is wrong, zap_pid_ns_processes() won't kill the pid
> > returned by the first idr_get_next().
> Yes, I missed this. I can simply remove the idr_get_next() before the
> idr_for_each_continue and that
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(), alloc_pidmap(), etc. are removed
On 09/27, Gargi Sharma wrote:
>
> @@ -309,7 +168,22 @@ struct pid *alloc_pid(struct pid_namespace *ns)
> tmp = ns;
> pid->level = ns->level;
> for (i = ns->level; i >= 0; i--) {
> - nr = alloc_pidmap(tmp);
> + int pid_min = 1;
> + idr_preload(GF
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
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) {
> > - rcu_read_lock();
> > + pid = idr_get_next(&
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(), alloc_pidmap(), etc. are removed.
> The rest of the functions are modified to use the IDR A
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 complex
11 matches
Mail list logo