[Xcb] Questions about xcb_writev and socket-handoff
Clemens Eisserer
linuxhippy at gmail.com
Wed Dec 17 04:53:02 PST 2008
Hi,
1.) I almost finished porting some C-code to pure java with
self-written protocol generation (
http://linuxhippy.blogspot.com/2008/12/almost-pure-java2d.html ).
However sometimes it gets stuck in native code waiting for the
X-Server, the stack trace looks like this:
#0 0xb7f35416 in __kernel_vsyscall ()
#1 0x009885f1 in select () from /lib/libc.so.6
#2 0xa40d9035 in _xcb_conn_wait () from /opt/xorg/lib/libxcb.so.1
#3 0xa40db33a in xcb_wait_for_reply () from /opt/xorg/lib/libxcb.so.1
#4 0xa412a078 in _XReply () from /opt/xorg/lib/libX11.so.6
#5 0xa411e7ea in XSync () from /opt/xorg/lib/libX11.so.6
#6 0xa4322798 in X11SD_GetSharedImage ()
#7 0xa43240fc in X11SD_GetRasInfo ()
#8 0xa43762ac in Java_sun_java2d_loops_Blit_Blit ()
#9 0xb57981c7 in ?? ()
Some parts of the code are still in C, like the image up/downloads -
this is the code in the stack-trace shown below.
Any idea what could be wrong, of how I could debug this problem?
2.) How does xcb_writev works for unix-domain-sockets?
I tried to find information about writev but didn't find in-depth stuff.
- I somewhere read that there is a maximum per-writev size that may
submitted, otherwise glibc will allocate a temporary buffer. How large
is that size?
- Does xcb_writev copy or block or even both? I have a dual-core
system but for now it seems when the x-server is processing commands
the client has to wait and vice-versa - so only one core is fully
loaded. When I used xlib-based code I often saw more than 100% load
when i summed up both the xserver's and client's cpu consumption, but
now 100% seems to be the upper limit.
How is that implemented in xcb, are there any tricks which could help
concurrency?
Thanks again for the handoff-functionality. Its so simple but extremly
flexible - exactly what I was looking for :)
Thank you in advance, Clemens
More information about the Xcb
mailing list