public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] The current state of the batman-adv vis code
@ 2012-05-07 19:35 Matthias Schiffer
  2012-05-08  5:59 ` Marek Lindner
  0 siblings, 1 reply; 9+ messages in thread
From: Matthias Schiffer @ 2012-05-07 19:35 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

[-- Attachment #1: Type: text/plain, Size: 966 bytes --]

Hi,
after reading Marek's and Sven's comments to my question about the vis
code, and looking at the code a bit I came to the following conclusion
about the first part of the cleanup, the finishing of the RCU conversion
of the vis code:

It should be possible to get rid of the vis_hash_lock altogether, as the
hash table has spinlocks for the hash lists itself; 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.

I think I found a bug in the hash_add function though. First there is a
RCU-locked loop that checks if a entry does already exist, but the
spinlock is taken after the rcu_read_unlock() - thus allowing the same
entry to be appended twice if two threads try to add it at the same time.

If you want to contact me about this via IRC, I'm now idling in #batman
- my nickname there is neoraider.

Thanks,
Matthias


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-05-11 19:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox