From: Matthias Diener <matthias.diener@mdiener.org>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5] hashtable: introduce a small and naive hashtable
Date: Sat, 15 Sep 2012 20:08:39 -0300 [thread overview]
Message-ID: <CAKBUcnA4b8HaV3-20C8QXXgFXW4ZDfOc6SvYCFsA3mtdyEd89Q@mail.gmail.com> (raw)
Sasha Levin (levinsasha928 <at> gmail.com) wrote:
>On Sat, Sep 15, 2012 at 5:14 PM, Mathieu Desnoyers
><mathieu.desnoyers <at> efficios.com> wrote:
>> * Sasha Levin (levinsasha928 <at> gmail.com) wrote:
[...]
>>> +#define hash_init(hashtable) \
>>> +({ \
>>> + int __i; \
>>> + \
>>> + for (__i = 0; __i < HASH_BITS(hashtable); __i++) \
>>
>> I think this fails to initialize the whole table. You'd need
>>
>> HASH_BITS -> HASH_SIZE
>
>Right.
>
>Unfortunately it's pretty hard catching something like this :/
>
>> Which brings the following question: how did you test this code ? It
>> would be nice to have a small test module along with this patchset that
>> stress-tests this simple hash table in various configurations (on stack,
>> in data, etc).
>
>I do two things:
>
> - A small userspace test (since this header works just fine from
>userspace as well).
It would be interesting to run some experiments with this hashtable in
userspace.
Could you post the test code here?
Thanks,
Matthias
next reply other threads:[~2012-09-15 23:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-15 23:08 Matthias Diener [this message]
2012-09-16 11:30 ` [PATCH v5] hashtable: introduce a small and naive hashtable Sasha Levin
-- strict thread matches above, loose matches on Subject: below --
2012-09-15 9:53 Sasha Levin
2012-09-15 15:14 ` Mathieu Desnoyers
2012-09-15 15:47 ` Sasha Levin
2012-09-16 19:33 ` Mathieu Desnoyers
2012-09-16 19:48 ` Sasha Levin
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=CAKBUcnA4b8HaV3-20C8QXXgFXW4ZDfOc6SvYCFsA3mtdyEd89Q@mail.gmail.com \
--to=matthias.diener@mdiener.org \
--cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).