All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [Fwd: [PATCH 2/7] lock_list: a fine grain locked double linked list]
Date: Sun, 28 Jan 2007 17:20:27 +0000	[thread overview]
Message-ID: <20070128172027.GA4913@infradead.org> (raw)
In-Reply-To: <1169999597.10987.33.camel@lappy>

> 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.


  reply	other threads:[~2007-01-28 17:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-28 15:53 [Fwd: [PATCH 2/7] lock_list: a fine grain locked double linked list] Peter Zijlstra
2007-01-28 17:20 ` Christoph Hellwig [this message]
2007-01-29 10:20   ` Peter Zijlstra
2007-01-29 10:25     ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070128172027.GA4913@infradead.org \
    --to=hch@infradead.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.