lkml.org 
[lkml]   [2017]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v6 1/2] pid: Replace pid bitmap implementation with IDR API
    On Wed, 11 Oct 2017 20:54:32 -0400 Rik van Riel <riel@surriel.com> wrote:

    > On Wed, 2017-10-11 at 15:37 -0700, Andrew Morton wrote:
    > > On Wed, 11 Oct 2017 18:19:38 -0400 Gargi Sharma <gs051095@gmail.com>
    > > 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 API.
    > > > The change was made to make the PID allocation less complex by
    > > > replacing custom code with calls to generic API.
    > >
    > > I still don't understand the locking.  spin_lock_irq(&pidmap_lock) in
    > > some places, rcu_read_lock() in others.
    > >
    > > If the locking is indeed now correct, can we please get it fully
    > > documented?  A comment at the pid_namespace.idr definition site would
    > > suit.
    >
    > Would you like me to send a follow-up patch to document the
    > locking?

    Sure.

    > Documenting the locking on all the existing code, plus the
    > new code, seems a little out of scope of an Outreachy
    > internship...

    I'm not referring to all the existing code! Just this new
    pid_namespace.idr's locking. If it was protected by
    spin_lock_irq(&pidmap_lock) everywhere then an explanation wouldn't be
    needed. But we have this oddball site where pidmap_lock isn't taken
    but it uses rcu_read_lock() which is surprising to say the least.
    Readers could be forgiven for thinking that is a bug.

    \
     
     \ /
      Last update: 2017-10-13 00:59    [W:3.984 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site