Bug 46578 - Xorg client scheduling has bad defaults (/algorithm)
Summary: Xorg client scheduling has bad defaults (/algorithm)
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: git
Hardware: All Linux (All)
: medium normal
Assignee: Adam Jackson
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-24 08:59 UTC by Lauri Kasanen
Modified: 2014-03-27 17:42 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Lauri Kasanen 2012-02-24 08:59:53 UTC
Adding a bug so this doesn't get lost. For the background see:
http://lists.freedesktop.org/archives/xorg/2012-January/054029.html

In short, the server ignores a client even if it has time to respond to it. This causes delays of up to 30ms to the ignored client, which is stuck in a call such as xquerypointer.
Comment 1 Alan Coopersmith 2013-10-19 04:47:59 UTC
Archives got rebuilt/renumbered so the old link is invalid.
New link seems to be:
http://lists.x.org/archives/xorg/2012-January/053821.html
http://lists.x.org/archives/xorg/2012-January/053826.html
Comment 2 Chris Wilson 2013-10-19 09:09:59 UTC
Also relevant: http://lists.x.org/archives/xorg-devel/2013-October/038135.html
Comment 3 Adam Jackson 2014-03-27 17:42:28 UTC
This is mostly fixed now, by:

commit c1ce807d9f18f215332d7eeb844e8c640f71c53c
Author: Keith Packard <keithp@keithp.com>
Date:   Wed Jan 22 11:01:59 2014 -0800

    dix: Praise clients which haven't run for a while, rather than idle clients

commit b61ccd5d9d368f3fbbae27ce14ac02a3db1884c4
Author: Adam Jackson <ajax@redhat.com>
Date:   Tue Nov 5 10:20:04 2013 -0500

    smartsched: Tweak the default scheduler intervals

We will now select() afresh every time we switch clients, and rely on the scheduler scores to pick the most-deserving client each time through.  It's _possible_ that we should instead try to drain every ready fd every time we call select(), but I'm not totally convinced, and it would require a lot of algorithmic changes to our main loop to maintain both fairness and responsiveness.  If we were a webserver it might make sense to maximize throughput like that, but probably we should consider select() cheap enough that we can just rely on the scheduler scores.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.