From: Matthias Schiffer <mschiffer@universe-factory.net>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] The current state of the batman-adv vis code
Date: Tue, 08 May 2012 16:18:34 +0200 [thread overview]
Message-ID: <4FA92B3A.40000@universe-factory.net> (raw)
In-Reply-To: <201205081359.26707.lindner_marek@yahoo.de>
[-- Attachment #1: Type: text/plain, Size: 1130 bytes --]
On 05/08/2012 07:59 AM, Marek Lindner wrote:
> On Tuesday, May 08, 2012 03:35:07 Matthias Schiffer wrote:
>> overall hash consistency might be a issue though - I would propose adding a
>> hash_update function that updates a hash entry without deleting and
>> re-adding the hlist node.
>
> Can you give an example of such an "update" ? Where would we need it ?
It would be useful to keep the output consistent even when the hash is
updated while the output is generated - as a delete-add sequence adds
the new element at the head of the hlist, a RCU-locked reader will not
see the element when the traversal position is between the head and the
old position of the element. An hash_update could use
hlist_replace_rcu() to replace an element in a way that each reader
either sees the old or the new version, but none loses it completely.
A hash_update_if version that gets an additional callback that is
provided with the old and the new element and gets to decide which
element to keep in the hash could be used to compare the sequence
numbers in the vis code and update the hash atomically.
Matthias
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
next prev parent reply other threads:[~2012-05-08 14:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-07 19:35 [B.A.T.M.A.N.] The current state of the batman-adv vis code Matthias Schiffer
2012-05-08 5:59 ` Marek Lindner
2012-05-08 14:18 ` Matthias Schiffer [this message]
2012-05-09 11:04 ` Marek Lindner
2012-05-09 14:59 ` Matthias Schiffer
2012-05-10 13:16 ` Marek Lindner
2012-05-08 20:31 ` [B.A.T.M.A.N.] [PATCH] batman-adv: fix locking in hash_add() Matthias Schiffer
2012-05-08 20:38 ` Sven Eckelmann
2012-05-11 19:50 ` Marek Lindner
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=4FA92B3A.40000@universe-factory.net \
--to=mschiffer@universe-factory.net \
--cc=b.a.t.m.a.n@lists.open-mesh.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