public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Arun Raghavan <arunsr@cse.iitk.ac.in>
Cc: dhowells@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [keys] Always use key_get() to increment key refcount
Date: Wed, 19 Mar 2008 22:29:06 +0000	[thread overview]
Message-ID: <8036.1205965746@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0803200227440.22605@peripatetic.hades>

Arun Raghavan <arunsr@cse.iitk.ac.in> wrote:

> Patch to use key_get() wherever the keys code manually increments the
> key refcount.
> 
> This should make debugging a little simpler for clients, since it
> becomes easier to track where a key's refcount changes.

The problem with this is that key_get() is not simply an atomic_inc().  You
end up introducing an extra conditional into each of these places where one is
not required.  Now it's possible that the compiler's optimiser is sufficiently
clever to get rid of them all, but do you guarantee that?

David

  reply	other threads:[~2008-03-19 23:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-19 21:14 [PATCH] [keys] Always use key_get() to increment key refcount Arun Raghavan
2008-03-19 22:29 ` David Howells [this message]
2008-03-20 11:13   ` Arun Raghavan

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=8036.1205965746@redhat.com \
    --to=dhowells@redhat.com \
    --cc=arunsr@cse.iitk.ac.in \
    --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