RFD: setting up a minimal xorg configuration
Adam Jackson
ajax at nwnk.net
Wed Apr 14 13:58:58 PDT 2010
On Wed, 2010-04-14 at 21:57 +0300, Tiago Vignatti wrote:
> For me seems so obvious to conditionalize code that I don't use. I understand
> that we'll be introducing complexity here, but it's must. IMHO the only thing
> to discuss is _how_ we should do it, trying to minimize such complexity.
The problem I have with your attack on this problem - and, don't get me
wrong, it's an important problem to consider - is that it doesn't seem
you know what you're measuring. I mean, --disable-xaa? You know that
doesn't get _loaded_ if the driver doesn't request it, right? And that
there's zero code in the core server conditional on it? So not building
it saves you exactly zero memory at runtime.
Whereas, to pick an example I happened to spot recently, the loader is
compiling a small pile of regexes, but then only sometimes using them,
and anyway we're not doing anything nearly complex enough to justify
them, let alone leaving them around after painting the root window. A
very quick (and possibly incorrect) read of the glibc regex source tells
me this is going to use >300 bytes per pattern.
And, like I've said several times now, text is free. Code you don't
execute never makes it into physical memory. Unless you're running out
of address space in the X server, code size is meaningless. Dirty data
size is your _entire_ problem. That's real memory pressure. Everything
else is second-order.
You really need to look at heap usage. Even on a desktop OS with
everything in the world configured and compiled, heap usage completely
outstrips trivial crap like DSO .data sections at runtime:
atropine:~% sudo grep -A1 rw-p.*fd /proc/`pidof Xorg`/smaps | awk 'BEGIN { i = 0 } /^Size/ { i += $2 } END { print i }'
460
atropine:~% sudo grep -A1 heap /proc/`pidof Xorg`/smaps
092e9000-0ac65000 rw-p 00000000 00:00 0 [heap]
Size: 26096 kB
Fight the real enemy.
- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100414/f7e17707/attachment.pgp>
More information about the xorg-devel
mailing list