Fixing devPrivates

Alan Coopersmith alan.coopersmith at oracle.com
Thu Apr 29 07:43:47 PDT 2010


Tiago Vignatti wrote:
> On Thu, Apr 29, 2010 at 08:59:06AM +0200, ext Keith Packard wrote:
>> What's the problem with devPrivates?
> 
> Reviewing your proposal made me think if we really need devPrivates mechanism
> at all.
> 
> It only exists to not change ABI all the time on data structures. But hey, is
> this a _real_ problem? I mean, for who cares about ABI, we have a way to track
> the control changes just going to xf86Module.h and bumping ABI_*. 

You'd prefer having all the structures allocate space for extensions that may
not be enabled (either at runtime or at compile time)?   And having to recompile
everything every time an extension needs to add a new member?

Because having the ABI depend on #ifdefs of whether the server was compiled with
DRI2 or XF86DGA is effectively having no ABI at all, and killing the ability to
provide driver binaries, whether closed source like nvidia, or open source like
the vmware & virtual box guest drivers they include in their guest additions kits.

>> What I don't have yet is any kind of memory usage or performance
>> comparison with the current devPrivates implementation. I should
>> probably do that just to document the benefit in more concrete terms,
>> but I'd rather not bother and just get this merged fairly soon.
> 
> I started one standalone Xorg and here are the results:
> 
> - with current devPrivates: 5008 kB
> - with new proposed devPrivates: 5032 kB
> 
> 
> I found pretty weird because I was waiting to decrease or, in the worst case,
> keep the same amount of memory used with your proposed work. Anyway, that's a
> gross measurement, just calling a standalone Xorg, i.e. without any client or
> whatever interacting. Maybe all those data structures keeping devPrivates will
> get swapped to physical memory only when actually some interactions happen? I
> don't know.

Given that each devPrivate key increased in size from a single int to a larger
structure, it's not that surprising.   I'd not expect savings until you've got
a whole bunch of windows, pixmaps, gc's, etc. allocated by clients.

-- 
	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System



More information about the xorg-devel mailing list