[PATCH] Flush buffer in time for global (un)lock xserver operation
Adam Jackson
ajax at nwnk.net
Wed Dec 11 20:20:47 UTC 2019
On Wed, 2019-12-04 at 18:24 +0800, chengang at emindsoft.com.cn wrote:
> From: Chen Gang <chengang at emindsoft.com.cn>
>
> The global (un)lock xserver operations will have effect to the whole
> system, and all the other gui apps have to be blocked, so the operations
> should not be buffered, or may cause sync issue, e.g. reboot machine.
Enh. I can maybe see the point of this for XUngrabServer, but I think
doing this for XGrabServer may actually make interactivity worse. With
the code as it is currently, the GrabServer request will be buffered
inside the client until something happens to flush it out (presumably
something like QueryTree or GetImage that provokes a reply), and while
it stays buffered other clients may still interact with the server.
With this change you'll immediately write the request to the server,
and you might lose your scheduler timeslice as a result, in which case
not only will the grabbing client need to wait to reschedule but every
other client will need to wait in line behind the grabbing client.
Do you have a scenario in mind that this helps with? Does doing _XFlush
only for XUngrabServer work just as well?
- ajax
More information about the xorg-devel
mailing list