lkml.org 
[lkml]   [2008]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH][-mm] reclassify sg_sysfs_class for lockdep
    From
    Date
    On Thu, 2008-05-29 at 08:45 +0800, Dave Young wrote:
    > > This isn't really a generic solution, is it? It only works because we
    > > currently only have two users of the interface functions, so if we
    > > reclassify one they look separate to lockdep. It will fall over again
    > > if we ever get another one.
    > >
    > > Surely the correct fix is to initialise lockdep for the mutex the same
    > > way we did for the semaphore in class_register() (which does exactly the
    > > same locking without triggering lockdep)? That way we'll also fix the
    > > problem for other conversions of semaphore->mutex.
    >
    > Matthew & greg did the work already.

    Yes, that was nice of them ...

    > >From my original idea I don't want to do this for all classes, and I
    > would think it as a rare case.

    Hardly ... the fact that it showed up in two different cases indicated
    the problem to be more generic.

    The root cause of the problem was that mutexes are part of the lockdep
    infrastructure whereas semaphores aren't and the dynamic initialisation
    of mutexes becomes a lockdep problem unless they're keyed and
    initiallised correctly. If you want to do more semaphore->mutex
    conversions, it would really be useful for you to understand what was
    done and why it was necessary ... because it's going to become necessary
    again in others of them.

    James




    \
     
     \ /
      Last update: 2008-05-29 05:27    [W:2.466 / U:0.280 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site