[PATCH] dix: Reshuffle ScreenRec to pack holes

Keith Packard keithp at keithp.com
Wed May 19 12:56:26 PDT 2010


On Wed, 19 May 2010 14:31:19 -0400, Adam Jackson <ajax at redhat.com> wrote:
> This eliminates the unused 'id' field (what the eff), and reorders the
> other data fields to fit packed on both ILP32 and LP64.  ScreenRec
> shrinks by 64 bytes on LP64 (less on ILP32), and devPrivate just
> barely squeaks into the first cacheline on LP64 as a bonus.

Of course, it would be 'really cool' if we could figure out which
elements of this structure were actually accessed frequently and stick
them in the same cache line. I'll bet 90% of accesses to this structure
are function pointers and devPrivates. devPrivate is probably not much
used as the drivers all need to pull pixmaps out of each window these
days.

But, this is way better than what we've got.

> This also marks a flags field for future expansion without needing to
> break ABI.
> 
> Signed-off-by: Adam Jackson <ajax at redhat.com>

Reviewed-by: Keith Packard <keithp at keithp.com>

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100519/81aecec1/attachment-0001.pgp>


More information about the xorg-devel mailing list