<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/lib/test_rhashtable.c, branch v4.16.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.16.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.16.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-03-07T15:44:03+00:00</updated>
<entry>
<title>test_rhashtable: add test case for rhltable with duplicate objects</title>
<updated>2018-03-07T15:44:03+00:00</updated>
<author>
<name>Paul Blakey</name>
<email>paulb@mellanox.com</email>
</author>
<published>2018-03-04T15:29:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=499ac3b60f657dae82055fc81c7b01e6242ac9bc'/>
<id>urn:sha1:499ac3b60f657dae82055fc81c7b01e6242ac9bc</id>
<content type='text'>
Tries to insert duplicates in the middle of bucket's chain:
bucket 1:  [[val 21 (tid=1)]] -&gt; [[ val 1 (tid=2),  val 1 (tid=0) ]]

Reuses tid to distinguish the elements insertion order.

Signed-off-by: Paul Blakey &lt;paulb@mellanox.com&gt;
Acked-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>rhashtable: Change rhashtable_walk_start to return void</title>
<updated>2017-12-11T14:58:38+00:00</updated>
<author>
<name>Tom Herbert</name>
<email>tom@quantonium.net</email>
</author>
<published>2017-12-04T18:31:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=97a6ec4ac021f7fbec05c15a3aa0c4aaf0461af5'/>
<id>urn:sha1:97a6ec4ac021f7fbec05c15a3aa0c4aaf0461af5</id>
<content type='text'>
Most callers of rhashtable_walk_start don't care about a resize event
which is indicated by a return value of -EAGAIN. So calls to
rhashtable_walk_start are wrapped wih code to ignore -EAGAIN. Something
like this is common:

       ret = rhashtable_walk_start(rhiter);
       if (ret &amp;&amp; ret != -EAGAIN)
               goto out;

Since zero and -EAGAIN are the only possible return values from the
function this check is pointless. The condition never evaluates to true.

This patch changes rhashtable_walk_start to return void. This simplifies
code for the callers that ignore -EAGAIN. For the few cases where the
caller cares about the resize event, particularly where the table can be
walked in mulitple parts for netlink or seq file dump, the function
rhashtable_walk_start_check has been added that returns -EAGAIN on a
resize event.

Signed-off-by: Tom Herbert &lt;tom@quantonium.net&gt;
Acked-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>test_rhashtable: remove initdata annotation</title>
<updated>2017-09-22T03:40:55+00:00</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2017-09-21T15:36:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=411d788a23f7e20b8fc51b548c7204fdecc9d22e'/>
<id>urn:sha1:411d788a23f7e20b8fc51b548c7204fdecc9d22e</id>
<content type='text'>
kbuild test robot reported a section mismatch warning w. gcc 4.x:
WARNING: lib/test_rhashtable.o(.text+0x139e):
Section mismatch in reference from the function rhltable_insert.clone.3() to the variable .init.data:rhlt

so remove this annotation.

Fixes: cdd4de372ea06 ("test_rhashtable: add test case for rhl_table interface")
Reported-by: kbuild test robot &lt;lkp@intel.com&gt;
Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>test_rhashtable: add test case for rhl_table interface</title>
<updated>2017-09-19T23:15:47+00:00</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2017-09-19T23:12:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cdd4de372ea06a18e104100b9f2c442527d26db1'/>
<id>urn:sha1:cdd4de372ea06a18e104100b9f2c442527d26db1</id>
<content type='text'>
also test rhltable.  rhltable remove operations are slow as
deletions require a list walk, thus test with 1/16th of the given
entry count number to get a run duration similar to rhashtable one.

Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>test_rhashtable: add a check for max_size</title>
<updated>2017-09-19T23:15:47+00:00</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2017-09-19T23:12:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a6359bd8dd1c3a15c09e7dbb533bf89d13b42acd'/>
<id>urn:sha1:a6359bd8dd1c3a15c09e7dbb533bf89d13b42acd</id>
<content type='text'>
add a test that tries to insert more than max_size elements.

Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>test_rhashtable: don't use global entries variable</title>
<updated>2017-09-19T23:15:47+00:00</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2017-09-19T23:12:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f651616e799ff01d1e21abc053ee1e23ac1a2344'/>
<id>urn:sha1:f651616e799ff01d1e21abc053ee1e23ac1a2344</id>
<content type='text'>
pass the entries to test as an argument instead.
Followup patch will add an rhlist test case; rhlist delete opererations
are slow so we need to use a smaller number to test it.

Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>test_rhashtable: don't allocate huge static array</title>
<updated>2017-09-19T23:15:47+00:00</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2017-09-19T23:12:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7e936bd73483eb1873b9ab6f375c9a1d781bc5cb'/>
<id>urn:sha1:7e936bd73483eb1873b9ab6f375c9a1d781bc5cb</id>
<content type='text'>
Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>lib: test_rhashtable: Fix KASAN warning</title>
<updated>2017-07-25T19:35:23+00:00</updated>
<author>
<name>Phil Sutter</name>
<email>phil@nwl.cc</email>
</author>
<published>2017-07-25T11:36:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=783692558a60cd69d8d86900b33846263598ca6c'/>
<id>urn:sha1:783692558a60cd69d8d86900b33846263598ca6c</id>
<content type='text'>
I forgot one spot when introducing struct test_obj_val.

Fixes: e859afe1ee0c5 ("lib: test_rhashtable: fix for large entry counts")
Reported by: kernel test robot &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Phil Sutter &lt;phil@nwl.cc&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>lib: test_rhashtable: fix for large entry counts</title>
<updated>2017-07-24T21:13:58+00:00</updated>
<author>
<name>Phil Sutter</name>
<email>phil@nwl.cc</email>
</author>
<published>2017-07-21T14:51:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e859afe1ee0c5ae981c55387ccd45eba258a7842'/>
<id>urn:sha1:e859afe1ee0c5ae981c55387ccd45eba258a7842</id>
<content type='text'>
During concurrent access testing, threadfunc() concatenated thread ID
and object index to create a unique key like so:

| tdata-&gt;objs[i].value = (tdata-&gt;id &lt;&lt; 16) | i;

This breaks if a user passes an entries parameter of 64k or higher,
since 'i' might use more than 16 bits then. Effectively, this will lead
to duplicate keys in the table.

Fix the problem by introducing a struct holding object and thread ID and
using that as key instead of a single integer type field.

Fixes: f4a3e90ba5739 ("rhashtable-test: extend to test concurrency")
Reported by: Manuel Messner &lt;mm@skelett.io&gt;
Signed-off-by: Phil Sutter &lt;phil@nwl.cc&gt;
Acked-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>rhashtable-test: Fix max_size parameter description</title>
<updated>2016-08-08T19:52:42+00:00</updated>
<author>
<name>Phil Sutter</name>
<email>phil@nwl.cc</email>
</author>
<published>2016-08-04T10:37:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3b3bf80b994f0c6c35a25ef8965ab956b4bcced5'/>
<id>urn:sha1:3b3bf80b994f0c6c35a25ef8965ab956b4bcced5</id>
<content type='text'>
Looks like a simple copy'n'paste error.

Fixes: 1aa661f5c3df1 ("rhashtable-test: Measure time to insert, remove &amp; traverse entries")
Signed-off-by: Phil Sutter &lt;phil@nwl.cc&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
