When does the X Server use offscreen pixmap areas?
Manfred Haertel, DB3HM
Manfred.Haertel at rz-online.de
Tue Jun 5 11:50:10 PDT 2007
Hello!
At the office, I am investigating strange performance issues with an
X11 application using a PCI graphics card and X.org V6.8.2 (yes, I know
that both are not the state of the art anymore, but this can't be
changed easily).
I tracked the problem down somehow. There are some pixmap operations in
the application, XCreatePixmap() and XCopyArea(). The XCopyArea()
sometimes (and only sometimes) takes a rather long time. It seems as if
the difference is whether the pixmap was allocated in main memory or on
the graphics card as a so called "offscreen pixmap area". If it is
allocated in main memory, it must be transferred over the PCI bus and
this takes some time if it is a large pixmap.
So I wrote a test program, which just does XCreatePixmap() on demand and
did, in parallel an "strace -e mmap2" on the X server, which happens
only if the pixmap is created in main memory. I don't really understand
the result. It does not only depend on width, height or area, where the
memory is alloacated. E.g. pixmaps with width x height x depth of
100x100x24, 300x300x24 and 400x400x24 are allocated on the grapics card
as an "offscreen pixmap area", but the pixmap with 200x200x24 is
allocated in main memory. Why???
How does the X server determine where to allocate the pixmap? If someone
could point me at least to the source code where this handling is done,
it would help me lot at least to understand and may be to solve
the problem.
Thanks for the help and best regards
--
Manfred Härtel, DB3HM mailto:Manfred.Haertel at rz-online.de
http://rz-home.de/mhaertel
More information about the xorg
mailing list