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

Adam Jackson ajax at nwnk.net
Mon Aug 2 10:34:57 PDT 2010


On Mon, 2010-08-02 at 17:40 +0300, Tiago Vignatti wrote:
> On Thu, Jul 29, 2010 at 11:41:10PM +0200, ext Adam Jackson wrote:
> > If we're stuck in some difficult bit of processing, there's no point in
> > punishing the client too strongly.  Worse, the continuous stream of
> > SIGALRM shows up in strace and thus people report "infinite stream of
> > SIGALRM" rather than whatever the bug actually is.
> > 
> > So if we're more than 10x past the maximum timeslice, just turn the
> > signal off.
> 
> 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.

- 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/20100802/006f8113/attachment.pgp>


More information about the xorg-devel mailing list