LWN: Comments on "The rhashtable documentation I wanted to read" https://lwn.net/Articles/751374/ This is a special feed containing comments posted to the individual LWN article titled "The rhashtable documentation I wanted to read". en-us Tue, 28 Oct 2025 11:41:05 +0000 Tue, 28 Oct 2025 11:41:05 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net error returns? https://lwn.net/Articles/751817/ https://lwn.net/Articles/751817/ TheJH <div class="FormattedComment"> It might be nice to have an explanation of what errors the rhashtable functions can throw, and when. For example, when does -EBUSY happen, and are there any rules that must be observed to allow the -EAGAIN retry loop in the slowpath to make forward progress?<br> </div> Sat, 14 Apr 2018 02:48:07 +0000 The rhashtable documentation I wanted to read https://lwn.net/Articles/751815/ https://lwn.net/Articles/751815/ TheJH <div class="FormattedComment"> <font class="QuotedText">&gt; The fact that they all end in the word fast is probably historical accident; there are no "slow" versions.</font><br> <p> There is a function rhashtable_insert_slow(), but the fast insert functions will automatically bail out to it (if rehashing is in progress or something might require rehashing).<br> </div> Sat, 14 Apr 2018 02:31:47 +0000 The rhashtable documentation I wanted to read https://lwn.net/Articles/751814/ https://lwn.net/Articles/751814/ zx2c4 For a while now I've been interested in using this with WireGuard, <a href="https://git.zx2c4.com/WireGuard/tree/src/hashtables.c">instead of using fixed-size hash tables by way of <tt>DECLARE_HASHTABLE</tt></a>. I'll need to change out the underlying hash function away from <tt>jhash2</tt>, presumably using the <tt>.hash_fn</tt> member as described here. In one instance, I use <tt>siphash</tt>, since values are attacker controlled, and in the other instance, I simply take the first N bits of the key, because the keys are already guaranteed to be uniformly distributed and non-attacker controlled. This article provides some nice motivation for actually getting this done. Sat, 14 Apr 2018 01:12:39 +0000 The rhashtable documentation I wanted to read https://lwn.net/Articles/751806/ https://lwn.net/Articles/751806/ abk77 <div class="FormattedComment"> Atleast the APIs seem very similar to list_init( ) , list_create( ) , list_insert( ) in Solaris.<br> <p> </div> Fri, 13 Apr 2018 22:14:03 +0000 The rhashtable documentation I wanted to read https://lwn.net/Articles/751805/ https://lwn.net/Articles/751805/ jake <div class="FormattedComment"> <font class="QuotedText">&gt; Looks like in "Object removal" there's a double RCU lock.</font><br> <p> Indeed, thanks for the report. Next time, though, we would sure appreciate it if you email typo reports to lwn@lwn.net.<br> <p> thanks,<br> <p> jake<br> </div> Fri, 13 Apr 2018 22:13:13 +0000 The rhashtable documentation I wanted to read https://lwn.net/Articles/751801/ https://lwn.net/Articles/751801/ post-factum <div class="FormattedComment"> Looks like in "Object removal" there's a double RCU lock.<br> </div> Fri, 13 Apr 2018 21:17:51 +0000