From: Rusty Russell <rusty@rustcorp.com.au>
To: Andi Kleen <ak@suse.de>
Cc: davids@webmaster.com, ak@suse.de, brad@linuxcanada.com,
linux-kernel@vger.kernel.org
Subject: Re: Multi-threading
Date: Thu, 14 Mar 2002 15:50:49 +1100 [thread overview]
Message-ID: <20020314155049.310d9402.rusty@rustcorp.com.au> (raw)
In-Reply-To: <20020313092306.A5570@wotan.suse.de>
In-Reply-To: <20020312081002.A14745@wotan.suse.de> <20020313075135.AAA25107@shell.webmaster.com@whenever> <20020313092306.A5570@wotan.suse.de>
On Wed, 13 Mar 2002 09:23:06 +0100
Andi Kleen <ak@suse.de> wrote:
> On Tue, Mar 12, 2002 at 11:51:29PM -0800, David Schwartz wrote:
> >
> > >Just it might change immediately afterwards if you don't remove the
> > >object from public view first.
> >
> > If it was in public view, whatever held it in public view would be
> > using it, and hence its use count could not drop to zero.
>
> That's not correct at least in the usual linux kernel pattern of using
> reference counts for objects. Hash tables don't hold reference counts,
> only users do. If you think about it a hash table or global list holding
> a reference count doesn't make too much sense.
Depends where you are talking. In the conntrack code (and I thought the
rest of the networking code), 0 means "free me now, NOONE has a pointer",
ie. the hash table holds 1.
dcache holds zero-count entries because their semantic requirements are
different, hence the "atomic_dec_and_lock()" stuff.
Cheers!
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
next prev parent reply other threads:[~2002-03-14 4:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20020311182111Z310364-889+120750@vger.kernel.org.suse.lists.linux.kernel>
2002-03-11 21:54 ` Multi-threading Andi Kleen
2002-03-12 0:02 ` Multi-threading Brad Pepers
[not found] ` <20020312000310.DBCF41EDB9@Cantor.suse.de>
2002-03-12 7:10 ` Multi-threading Andi Kleen
2002-03-13 7:51 ` Multi-threading David Schwartz
2002-03-13 8:23 ` Multi-threading Andi Kleen
2002-03-13 9:01 ` Multi-threading David Schwartz
2002-03-14 4:50 ` Rusty Russell [this message]
2002-03-11 19:36 Multi-threading Dipankar Sarma
2002-03-11 23:53 ` Multi-threading Brad Pepers
-- strict thread matches above, loose matches on Subject: below --
2002-03-11 18:20 Multi-threading Brad Pepers
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=20020314155049.310d9402.rusty@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=ak@suse.de \
--cc=brad@linuxcanada.com \
--cc=davids@webmaster.com \
--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