From: jlayton@poochiereds.net (Jeff Layton)
Subject: [lttng-dev] cds_lfht_count_nodes always returns -1 for before/after counts
Date: Sat, 25 Apr 2015 17:29:02 -0400 [thread overview]
Message-ID: <20150425172902.08ca0cdc@tlielax.poochiereds.net> (raw)
Hi, I have some code using the cds_lfht infrastructure, and recently
added a function to check to see if the table was empty using
cds_lfht_count_nodes. That function just does this:
rcu_read_lock();
cds_lfht_count_nodes(ht, &before, &count, &after);
rcu_read_unlock();
What I've found though is that when the table is empty and I know that
there are no concurrent inserts going on, the before and after counters
are always set to -1 after this call.
Is that expected behavior? For the record, I'm using this package from
the Fedora 21 repos:
userspace-rcu-0.8.1-5.fc21.x86_64
Thanks in advance!
--
Jeff Layton <jlayton at poochiereds.net>
next reply other threads:[~2015-04-25 21:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-25 21:29 Jeff Layton [this message]
2015-04-25 23:32 ` Jeff Layton
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=20150425172902.08ca0cdc@tlielax.poochiereds.net \
--to=jlayton@poochiereds.net \
/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