[lkml]   [2006]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [RFC][PATCH 0/4] Redesign cpu_hotplug locking.

    * Gautham R Shenoy <> wrote:

    > So here's an implementation on the lines of (c).
    > There are two types of tasks interested in cpu_hotplug
    > - ones who want to *prevent* a hotplug event.
    > - ones who want to *perform* a cpu hotplug.
    > For sake of simplicity let's call the former ones readers (though I
    > would have prefered inhibitors or somthing fancier!) and latter ones
    > writers. Let write operation = cpu_hotplug operation.
    > -The protocol is analogous to RWSEM, *only not so fair* .

    really nice! I'm quite sure that this is the right way to approach this

    Please add the appropriate lock_acquire()/lock_release() calls into the
    new sleeping semaphore type. Just use the parameters that rwlocks use:

    #define rwlock_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, i)
    #define rwlock_acquire_read(l, s, t, i) lock_acquire(l, s, t, 2, 2, i)

    and lockdep will allow recursive read-locking. You'll also need a
    lockdep_init_map() call to register the lock with lockdep. Then your
    locking scheme will be fully checked by lockdep too. (with your current
    code the new lock type is not added to the lock dependency graph(s))

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2006-08-24 12:45    [W:0.021 / U:2.832 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site