Re: [PATCH - revised] rhashtable: detect when object movement might have invalidated a lookup

From
NeilBrown <hidden>
Date
2018-07-20 06:24:30
Also in
lkml
Reply to
Herbert Xu, 2018-07-17
On Tue, Jul 17 2018, Herbert Xu wrote:
On Mon, Jul 16, 2018 at 01:26:42PM +1000, NeilBrown wrote:
quoted
Look in Documenation/RCU/rculist_nulls.txt.
The very first example is a typical lookup for a nulls list.
The above sample code would read:
OK, but how will this work with rhlist? It would be very bad to
have a feature that works for rhashtable but fails in strange
ways when you use rhlist.
It should be easy enough to handle in rhlist too.
When inserting a new object, we put it at the start of the chain, and if
there was already a list with the same key, it gets moved to
the new object.
A walk could see some objects repeatedly when this happens, but that
is already possible.

Thanks,
NeilBrown

Cheers,
-- 
Email: Herbert Xu [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Attachments

Thread (60 messages) 60 messages, 7 authors, last reply 2018-07-26
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help