From: Andi Kleen <ak@muc.de>
To: Greg KH <greg@kroah.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC] kref, a tiny, sane, reference count object
Date: Sat, 13 Mar 2004 21:43:09 +0100 [thread overview]
Message-ID: <m3d67gscki.fsf@averell.firstfloor.org> (raw)
In-Reply-To: <1zm3F-2ex-7@gated-at.bofh.it> (Greg KH's message of "Sat, 13 Mar 2004 19:30:11 +0100")
Greg KH <greg@kroah.com> writes:
> But people do get it wrong (I've seen it happen). Using this keeps you
If they cannot get a simple reference counter right it is doubtful
the rest of their code will do any good.
> from having to write your own get, and put functions. Multiply that by
> every usb driver that wants to (and needs to) use this kind of logic,
> and you have a lot of duplicated code that is unnecessary.
Lots of duplicated one liners. Sounds like a big issue.
For me this thing smells more like overabstraction.
> So we write it once, get it correct, and let everyone use it. Isn't
> that what the code in /lib is for? :)
I would agree if it is significant code. But all you're replacing is a
few straight forward one/two liners, and that at the cost of less
efficient space usage (12 byte overhead on 64bit)
-Andi
next parent reply other threads:[~2004-03-13 20:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1zhdz-5uL-3@gated-at.bofh.it>
[not found] ` <1zhdz-5uL-1@gated-at.bofh.it>
[not found] ` <1zm3F-2ex-7@gated-at.bofh.it>
2004-03-13 20:43 ` Andi Kleen [this message]
[not found] <1zcH2-KO-11@gated-at.bofh.it>
2004-03-13 13:06 ` [RFC] kref, a tiny, sane, reference count object Andi Kleen
2004-03-13 18:14 ` Greg KH
2004-03-13 9:10 Peter Kjellerstedt
2004-03-13 18:15 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2004-03-13 8:20 Greg KH
2004-03-14 0:34 ` Andrew Morton
2004-03-14 2:55 ` Greg KH
2004-03-14 3:30 ` Nick Piggin
2004-03-14 4:10 ` Andrew Morton
2004-03-14 4:20 ` Nick Piggin
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=m3d67gscki.fsf@averell.firstfloor.org \
--to=ak@muc.de \
--cc=greg@kroah.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;
as well as URLs for NNTP newsgroup(s).