public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Andi Kleen <ak@muc.de>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Driver Core update for 2.6.4
Date: Tue, 16 Mar 2004 11:40:39 -0800	[thread overview]
Message-ID: <20040316194039.GA21702@kroah.com> (raw)
In-Reply-To: <m3brmwojk8.fsf@averell.firstfloor.org>

On Tue, Mar 16, 2004 at 05:14:47PM +0100, Andi Kleen wrote:
> Andrew Morton <akpm@osdl.org> writes:
> >
> > eh?  If there is any argument against this code it is that it is so simple
> > that the thing which it abstracts is not worth abstracting.  But given that
> > it is so unwasteful, this seems unimportant.
> 
> The bloat argument was about the additional pointer in the dynamic 
> data structure (on a 64bit architecture it costs 12 bytes) 

Well balance that out against every usb driver re-implemeting the same
get/put logic with an atomic counter and that "bloat of a pointer" just
got lost in the noise of the extra kernel code size increase :)

> Better would be to pass the callback to kref_put(), but then it would
> be even better to just test the return value (callbacks are obfuscation
> and should be avoided when not needed)

You don't always have the same chunk of code doing the last kref_put()
as the one where we know the release function is at.  See the
kobject/driver model code for an example of this.

thanks,

greg k-h

  reply	other threads:[~2004-03-16 19:45 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1AajM-5vw-21@gated-at.bofh.it>
     [not found] ` <1Abpq-6Av-1@gated-at.bofh.it>
     [not found]   ` <1Aj3K-5Fn-9@gated-at.bofh.it>
     [not found]     ` <1AjwZ-65D-15@gated-at.bofh.it>
2004-03-16 16:14       ` [PATCH] Driver Core update for 2.6.4 Andi Kleen
2004-03-16 19:40         ` Greg KH [this message]
2004-03-17  0:01           ` Andi Kleen
2004-03-19  9:17         ` Jamie Lokier
2004-03-19 11:52           ` Giuseppe Bilotta
2004-03-15 23:55 [BK PATCH] " Greg KH
2004-03-15 23:59 ` [PATCH] " Greg KH
2004-03-15 23:59   ` Greg KH
2004-03-15 23:59     ` Greg KH
2004-03-15 23:59       ` Greg KH
2004-03-15 23:59         ` Greg KH
2004-03-15 23:59           ` Greg KH
2004-03-15 23:59             ` Greg KH
2004-03-15 23:59               ` Greg KH
2004-03-15 23:59                 ` Greg KH
2004-03-15 23:59                   ` Greg KH
2004-03-15 23:59                     ` Greg KH
2004-03-15 23:59                       ` Greg KH
2004-03-15 23:59                         ` Greg KH
2004-03-15 23:59                           ` Greg KH
2004-03-15 23:59                             ` Greg KH
2004-03-15 23:59                               ` Greg KH
2004-03-16  7:04                                 ` Christoph Hellwig
2004-03-16  9:51                                   ` Andrew Morton

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=20040316194039.GA21702@kroah.com \
    --to=greg@kroah.com \
    --cc=ak@muc.de \
    --cc=akpm@osdl.org \
    --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