linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Havoc Pennington <hp@redhat.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: [ANNOUNCE] udev 0.1 release
Date: Fri, 11 Apr 2003 19:29:20 +0000	[thread overview]
Message-ID: <marc-linux-hotplug-105008949024227@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-105003172531462@msgid-missing>

On Fri, Apr 11, 2003 at 12:07:17PM -0700, Greg KH wrote: 
> Problem is I don't think we can use D-BUS messages during early boot,
> before init is called, so we still have to be able to handle startup
> issues.  But hopefully the D-BUS code can be small enough to possibly be
> used in this manner, I haven't checked that out yet.

I'm not sure what the threshold for small enough is, but I'll give you
an analysis of D-BUS size.

The current size is:

# size /usr/lib/libdbus-1.so
   text    data     bss     dec     hex filename
 138905    1548     148  140601   22539 /usr/lib/libdbus-1.so
# size /usr/bin/dbus-daemon-1
   text    data     bss     dec     hex filename
 170756    1616     160  172532   2a1f4 /usr/bin/dbus-daemon-1

The daemon statically links in the whole library, so the 138K is in
fact copied twice; the daemon itself is not that much code.  I'm not
sure if libtool is already doing GC on unused statically-linked-in
code or if -fgc-sections would help.

The library contains some dead/unused code that could be cleaned up,
but there are also a few small things not yet implemented.  So I
expect to stay in approximately the 150K range over time.

We could probably get down to 100K by not handling out of memory (just
aborting on out of memory), but it seems like we need to handle that.
The OOM error codepaths are a pretty substantial percentage of overall
code size, surprisingly so.

The other significant fraction of the library is that D-BUS contains
its own little utility lib that reinvents bits of GLib/Qt - hash
table, linked list, memory pools, etc.

This utility lib API isn't exported from libdbus-1.so, but is used by
the daemon, which is why the daemon is statically linked.

Library code specific to D-BUS functionality, minus generic utility
code, minus OOM handling, is probably on the order of 50K.

There is one external dependency, which is an XML parser. 
libexpat is the smallest one I know of:
  # size /usr/lib/libexpat.so
    text    data     bss     dec     hex filename
  122440    6048       4  128492   1f5ec /usr/lib/libexpat.so

As this dependency is only for the daemon, -fgc-sections and static
linkage could help. We could also cut-and-paste the "gmarkup" 
pseudo-fake-xml-subset parser from GLib, that is about this big:

# size /cvs/gnome-cvs/glib/glib/gmarkup.o
   text    data     bss     dec     hex filename
  13816       4       0   13820    35fc  /cvs/gnome-cvs/glib/glib/gmarkup.o

Finally, as D-BUS is meant to be a well-defined protocol, it would
also be possible to create a "lite" client library perhaps, by
choosing to make certain sacrifices. (e.g. by allowing only a single
connection at a time, not handling OOM, and always blocking instead of
having the ability to integrate into a main loop.) Obviously that
would be a maintenance burden, though.

Havoc


-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

  parent reply	other threads:[~2003-04-11 19:29 UTC|newest]

Thread overview: 89+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-11  3:24 [ANNOUNCE] udev 0.1 release Greg KH
2003-04-11  6:37 ` Oliver Neukum
2003-04-11 17:10 ` Jeremy Jackson
2003-04-11 17:18 ` Justin Cormack
2003-04-11 17:20 ` Greg KH
2003-04-11 17:21 ` Greg KH
2003-04-11 17:46 ` John Bradford
2003-04-11 18:02 ` Roman Zippel
2003-04-11 18:12 ` Oliver Neukum
2003-04-11 18:12 ` Greg KH
2003-04-11 18:23 ` Antonio Vargas
2003-04-11 18:30 ` Oliver Neukum
2003-04-11 18:31 ` Kevin P. Fleming
2003-04-11 18:52 ` Greg KH
2003-04-11 19:00 ` Oliver Neukum
2003-04-11 19:07 ` Greg KH
2003-04-11 19:09 ` Mike Dresser
2003-04-11 19:28 ` Joel Becker
2003-04-11 19:29 ` Havoc Pennington [this message]
2003-04-11 19:31 ` Oliver Neukum
2003-04-11 19:38 ` Kevin P. Fleming
2003-04-11 19:54 ` Richard B. Johnson
2003-04-11 19:58 ` Greg KH
2003-04-11 19:59 ` Mike Dresser
2003-04-11 20:09 ` Nick Craig-Wood
2003-04-11 20:10 ` Greg KH
2003-04-11 20:16 ` John Bradford
2003-04-11 20:16 ` Mike Dresser
2003-04-11 20:23 ` Chris Hanson
2003-04-11 20:29 ` Steven Dake
2003-04-11 20:32 ` Mike Dresser
2003-04-11 20:39 ` Richard B. Johnson
2003-04-11 20:42 ` Perez-Gonzalez, Inaky
2003-04-11 20:43 ` Greg KH
2003-04-11 20:47 ` Richard B. Johnson
2003-04-11 20:48 ` David Lang
2003-04-11 20:56 ` Oliver Neukum
2003-04-11 20:59 ` Greg KH
2003-04-11 21:03 ` Oliver Neukum
2003-04-11 21:28 ` Martin Mares
2003-04-11 21:52 ` Jason Riedy
2003-04-11 22:00 ` Alex Bligh - linux-kernel
2003-04-11 22:03 ` Alex Bligh - linux-kernel
2003-04-11 22:09 ` Andrew Morton
2003-04-11 22:19 ` Tim Hockin
2003-04-11 22:27 ` Perez-Gonzalez, Inaky
2003-04-11 22:30 ` Steven Dake
2003-04-11 22:32 ` Steven Dake
2003-04-11 22:36 ` Perez-Gonzalez, Inaky
2003-04-11 22:38 ` Lars Marowsky-Bree
2003-04-11 22:41 ` David Lang
2003-04-11 22:42 ` Perez-Gonzalez, Inaky
2003-04-11 22:43 ` Steven Dake
2003-04-11 22:47 ` Andrew Morton
2003-04-11 22:51 ` Greg KH
2003-04-11 22:53 ` Jason Riedy
2003-04-11 22:53 ` Greg KH
2003-04-11 22:56 ` Greg KH
2003-04-11 22:58 ` Greg KH
2003-04-11 22:59 ` Perez-Gonzalez, Inaky
2003-04-11 23:01 ` Greg KH
2003-04-11 23:03 ` Greg KH
2003-04-11 23:23 ` Andrew Morton
2003-04-11 23:25 ` Joel Becker
2003-04-11 23:25 ` Jason Riedy
2003-04-11 23:26 ` Joel Becker
2003-04-11 23:27 ` Steven Dake
2003-04-11 23:31 ` Steven Dake
2003-04-11 23:32 ` Greg KH
2003-04-11 23:32 ` Steven Dake
2003-04-11 23:35 ` Greg KH
2003-04-11 23:37 ` Steven Dake
2003-04-11 23:37 ` Greg KH
2003-04-11 23:39 ` Steven Dake
2003-04-11 23:45 ` Greg KH
2003-04-12  0:04 ` Joel Becker
2003-04-12  0:11 ` Greg KH
2003-04-12  0:19 ` Joel Becker
2003-04-12  4:20 ` Greg KH
2003-04-12  6:45 ` Lars Marowsky-Bree
2003-04-12  7:49 ` Oliver Neukum
2003-04-12  7:53 ` Oliver Neukum
2003-04-12  8:04 ` Oliver Neukum
2003-04-12  8:07 ` Greg KH
2003-04-12 12:18 ` Arnd Bergmann
2003-04-12 14:45 ` Alan Cox
2003-04-12 23:27 ` Havoc Pennington
2003-04-19  4:16 ` David Brownell
2003-04-19  4:39 ` David Brownell

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=marc-linux-hotplug-105008949024227@msgid-missing \
    --to=hp@redhat.com \
    --cc=linux-hotplug@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).