lkml.org 
[lkml]   [2007]   [Jan]   [28]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSun, 28 Jan 2007 17:20:27 +0000
FromChristoph Hellwig <>
SubjectRe: [Fwd: [PATCH 2/7] lock_list: a fine grain locked double linked list]
> Provide a simple fine grain locked double link list.
> 
> It is build upon the regular double linked list primitives, spinlocks and RCU.
> 
> Locking is peculiar in that edges are locked, this avoid the circular lock
> dependancy created by the fact that the regular linked lists are circular.
> 
> Item deletion requires that both surrounding elements are locked, however since
> the locking rules dictate that we lock elements in a single direction we have
> to lock the previous element while it might be deleted under us. Hence the
> requirement that all elements are RCU freed.

I think implicitly locked data structures are very bad for code readability
and debugability.  What's even worse here is that we have a requirement that
all members are RCU freed.

Note that we also have another implicitly locked (and refcounted) list
implementation in klist.[ch] - if we find consensus that we want implicitly
locked list we should figure out whether we want lock_list or klist semantics
and stick to one of them.

What uses do you have planned for this data structure?  In general I think
we'd be better off to simplify the data structures as in my files_list_lock
proposal instead of complicating the locking.

-
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: 2007-01-28 18:23    [from the cache]
©2003-2008