lkml.org 
[lkml]   [2010]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH] sysfs: differentiate between locking links and non-links
    From
    On Wed, Feb 10, 2010 at 11:19 AM, David Rientjes <rientjes@google.com> wrote:
    > On Wed, 10 Feb 2010, Américo Wang wrote:
    >
    >> > You should be able to reuse Neil's sysfs_dirent_init_lockdep(sd, type) to
    >> > seperate the lock classes for the sd getting pinned in
    >> > sysfs_get_active_two() from sysfs_deactivate(), although using subclasses
    >> > would probably be optimal since there is a clear parent -> child relationship.
    >>
    >> Yeah, basically, my fix is also adding a separate lockdep class, but
    >> at a different
    >> level. I will send the fix as soon as I finish it.
    >>
    >
    > They shouldn't be entirely seperate classes for your "mutable" cases since
    > there will always be a parent -> child relationship, they should be
    > subclasses under the same lockclass at a SINGLE_DEPTH_NESTING level.

    The relationship is not always clear, take the cpu hotplug case as an example,
    there are plenty of sysfs files will be removed if we take one cpu
    offline, like mce
    files, which are not even under the same directory with cpu sysfs
    device directory.
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2010-02-10 04:37    [W:2.577 / U:1.180 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site