[PATCH] os: Turn off the scheduler alarm after an arbitrary length of time

Adam Jackson ajax at nwnk.net
Thu Aug 5 12:06:35 PDT 2010


On Wed, 2010-08-04 at 18:18 +0300, Vignatti Tiago (Nokia-MS/Helsinki)
wrote:
> On Mon, Aug 02, 2010 at 07:34:57PM +0200, ext Adam Jackson wrote:
> > On Mon, 2010-08-02 at 17:40 +0300, Tiago Vignatti wrote:
> > > just wondering what made you think 10 is a good number?
> > 
> > I'd be lying if I said I thought very hard about it.  The way the
> > defaults work out, the maximum timeslice is 200ms, which is 10 times as
> > long as the scheduler tick.  Another 10x is 2 seconds, which is:
> > 
> > - well into "wtf why is it stuck" territory
> > - a bit before anyone would have thought to attach strace
> > - long enough that no amount of scheduler punishment will improve the
> >   user experience
> > 
> > But it's not something that's interesting to be precise about.
> 
> I understand your intention to shut up SIGALRM in strace when a client is
> doing a busy rendering. But I'm afraid adding this feature will impact in the
> overall scheduling - not that we're doing great on this area, but would
> require more study to see if this prioritization of a busy client doesn't
> negatively affects other clients... it's just hard to validate your changes.

By the time we turn the alarm off (in this patch), we've already
accumulated several points of penalty for the "busy" client.  It'll be
punished, just not _infinitely_ punished like before.

> BTW, I didn't tried your patch, but are you sure this works as expected? If I
> understood correctly, this only works for single large requests and for other
> cases SmartScheduleStartTimer is going to be called always after another
> request wakes the server, re-starting the SIGALRM madness. So if there's
> always chunks of large requests you're going to see SIGALRM handler anyway.

Sure.  I'm not trying to solve that.  I'm trying to solve a single stuck
request being misinterpreted as "SIGALRM party" instead of "DRM command
stuck forever".

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100805/b9a2122b/attachment.pgp>


More information about the xorg-devel mailing list