[Ocfs2-devel] [RFC][PATCH 0/3] configfs: Make nested default groups lockdep-friendly

Joel Becker Joel.Becker at oracle.com
Tue May 20 15:27:02 PDT 2008


On Tue, May 20, 2008 at 03:13:41PM -0700, Arjan van de Ven wrote:
> > 	Louis, what about sticking the recursion level on
> > configfs_dirent?  That is, you could add sd->s_level and then use it
> > when needed.  THis would hopefully avoid having to pass the level as
> > an argument to every function.  Then we can go back to your original
> > scheme.  If they recurse too much and hit the lockdep limit, just
> > rewind everything and return -ELOOP.
> 
> you can also make a new lockdep key for each level... not pretty but it
> works

	I think that's what we're talking about here.  The toplevel is
I_MUTEX_PARENT, then each child has a class of (I_MUTEX_CHILD + depth),
where depth is the value of s_level.  His original try passed depth
everywhere.  I'm asking him to attach it to the configfs_dirent so that
the code stays readable.  We run into a depth limit at
(MAX_LOCKDEP_SUBCLASS - I_MUTEX_PARENT - 1 == 5), which I think is
probably sane.
	Do you mean something else?  Perhaps not starting from
I_MUTEX_PARENT/CHILD and instead creating CONFIGFS_MUTEX_XXX?

Joel

-- 

"Copy from one, it's plagiarism; copy from two, it's research."
        - Wilson Mizner

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127



More information about the Ocfs2-devel mailing list