From: Linus Torvalds <torvalds@osdl.org>
To: David Howells <dhowells@redhat.com>
Cc: akpm@osdl.org, trond.myklebust@fys.uio.no, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] keys: Discard key spinlock and use RCU for key payload
Date: Wed, 9 Mar 2005 10:24:04 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.58.0503091019060.2530@ppc970.osdl.org> (raw)
In-Reply-To: <28092.1110391155@redhat.com>
On Wed, 9 Mar 2005, David Howells wrote:
>
> The attached patch changes the key implementation in a number of ways:
>
> (1) It removes the spinlock from the key structure.
>
> (2) The key flags are now accessed using atomic bitops instead of
> write-locking the key spinlock and using C bitwise operators.
I'd suggest against using __set_bit() for the initialization. Either use
the proper set_bit() (which is slow, but at least consistent), or just
initialize it with (1ul << KEY_FLAG_IN_QUOTA). __set_bit is generally
slower than setting a value (it's pretty guaranteed not to be faster, and
at least on x86 is clearly slower), so using it as an "optimization" is
misguided.
RCU seems to fit the key model pretty well, but I still wonder whether the
conceptual complexity is worth it. Was this done on a whim, or was there
some real reason for it? I'd love for that to be documented while you're
at it..
Linus
next prev parent reply other threads:[~2005-03-09 18:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-09 17:59 David Howells
2005-03-09 18:24 ` Linus Torvalds [this message]
2005-03-09 18:43 ` David Howells
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=Pine.LNX.4.58.0503091019060.2530@ppc970.osdl.org \
--to=torvalds@osdl.org \
--cc=akpm@osdl.org \
--cc=dhowells@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=trond.myklebust@fys.uio.no \
/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
all inboxes | Powered by JetHome®