From: michi1@michaelblizek.twilightparadox.com (michi1 at michaelblizek.twilightparadox.com)
To: kernelnewbies@lists.kernelnewbies.org
Subject: NMIs, Locks, linked lists, barriers, and rculists, oh my!
Date: Fri, 5 Apr 2013 07:28:14 +0200 [thread overview]
Message-ID: <20130405052813.GA2240@grml> (raw)
In-Reply-To: <20130404210312.GA16275@worldash.org>
Hi!
On 14:03 Thu 04 Apr , Arlie Stephens wrote:
...
> On Apr 04 2013, michi1 at michaelblizek.twilightparadox.com wrote:
...
> > On 19:08 Wed 03 Apr , Arlie Stephens wrote:
...
> > > fix __list_add() so it updates pointers in the new entry before updating
> > > pointers in its neighbours,
> >
> > IMHO, this is like asking for trouble. Somebody else might change the order
> > in the future without knowing it might break your stuff. Also, if you have bad
> > luck, somebody else might already depend on the current order without you
> > knowing.
>
> It's notable that __list_add_rcu(), from rculist.h has the order the
> way I want it, even in our elderly kernel version.
>
> > You should at least do atomic_read()+atomic_set(). RCU is exactly that plus
> > a mechanism to free memory after all readers have finished.
>
> Now I'm confused. It seems to me that part of RCU's contribution is
> use of barrier instructions (compiler and run-time) at appropriate
> points. Are you saying that atomic_read() and atomic_set() have
> implicit barriers?
You are right, it seems like atomic ops do not imply barriers:
Documentation/atomic_ops.txt
-Michi
--
programing a layer 3+4 network protocol for mesh networks
see http://michaelblizek.twilightparadox.com
prev parent reply other threads:[~2013-04-05 5:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-04 2:08 NMIs, Locks, linked lists, barriers, and rculists, oh my! Arlie Stephens
2013-04-04 4:21 ` Valdis.Kletnieks at vt.edu
2013-04-04 7:31 ` Arlie Stephens
2013-04-04 17:10 ` michi1 at michaelblizek.twilightparadox.com
2013-04-04 21:03 ` Arlie Stephens
2013-04-05 5:28 ` michi1 at michaelblizek.twilightparadox.com [this message]
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=20130405052813.GA2240@grml \
--to=michi1@michaelblizek.twilightparadox.com \
--cc=kernelnewbies@lists.kernelnewbies.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).