All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephen Hemminger <shemminger@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: device struct bloat
Date: Sun, 4 Nov 2007 19:58:55 -0800	[thread overview]
Message-ID: <20071105035855.GA25511@kroah.com> (raw)
In-Reply-To: <1194208158.5911.63.camel@lappy>

On Sun, Nov 04, 2007 at 09:29:18PM +0100, Peter Zijlstra wrote:
> 
> On Sat, 2007-11-03 at 12:48 -0700, Stephen Hemminger wrote:
> > The sizeof(struct device) is way too big, especially in the network device case.
> > We want to support 1000's of device's and the change from class_device to
> > net_device has caused needless bloat.
> > 
> > sizeof(struct device) = 272
> > sizeof(struct class_device) = 92
> >   * not the class_id in class_device could also be removed or changed to
> >      a ptr, since it is redundant for net_devices.
> 
> The thing that surprised me most was that it contains a struct
> semaphore, Greg, is that really needed?

Yes, it serializes bind and unbind stuff for the device.  There are
comments about it in drivers/base/dd.c if you want to look into it.

thanks,

greg k-h

  reply	other threads:[~2007-11-05  3:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-03 19:48 device struct bloat Stephen Hemminger
2007-11-03 23:14 ` Greg KH
2007-11-04 20:29 ` Peter Zijlstra
2007-11-05  3:58   ` Greg KH [this message]
2007-11-05 10:46     ` Peter Zijlstra
2007-11-05 10:57       ` Peter Zijlstra
2007-11-05 22:33         ` Stefan Richter
2007-11-05 22:49         ` Greg KH
2007-11-06  1:38           ` [linux-usb-devel] " David Brownell
2007-11-06  9:43             ` Peter Zijlstra
2007-11-06  9:48           ` Peter Zijlstra
2007-11-06 15:36           ` Alan Stern
2007-11-06 15:58             ` Peter Zijlstra
2007-11-06 16:32               ` Alan Stern
2007-11-06 17:19                 ` Peter Zijlstra
2007-11-06 18:05                   ` Alan Stern
2007-11-06 18:57                     ` Peter Zijlstra
2007-11-07 16:42                       ` Alan Stern

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=20071105035855.GA25511@kroah.com \
    --to=greg@kroah.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shemminger@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.