[PATCH xserver 01/20] Remove non-smart scheduler. Don't require setitimer.

Keith Packard keithp at keithp.com
Tue Nov 17 18:06:37 PST 2015


Adam Jackson <ajax at nwnk.net> writes:

> On Wed, 2015-11-11 at 22:02 -0800, Keith Packard wrote:
>> This allows the server to call GetTimeInMillis() after each request is
>> processed to avoid needing setitimer. -dumbSched now turns off the
>> setitimer.
>
> I'm not sure there are real systems we'd be protecting by not requiring
> setitimer.

Sure, I mostly want the -dumbSched code so I can debug things without
signals getting in my way, while still getting rid of the old
scheduler.

>  But, at least on my Ivybridge, this only dings noop
> performance by like 1% when using -dumbSched.  Probably this would be
> worse on non-vdso setups, but anyone with both of those problems is
> already in pretty bad shape.

I'd love to get rid of the timer entirely, but at least making the
scheduler the same all of the time makes the server easier to read.

> Would also be nice to see doc/smartsched updated to reflect reality,
> I'll take a crack at that.

Thanks!

>
>> +#if HAVE_SETITIMER
>>      if (SmartScheduleEnable() < 0) {
>>          perror("sigaction for smart scheduler");
>> -        SmartScheduleDisable = TRUE;
>> +        SmartScheduleSignalEnable = FALSE;
>>      }
>> +#endif
>>  }
>
> I have a slight preference for doing like this in the header:
>
> #ifndef HAVE_SETITIMER
> #define SmartScheduleEnable() 0
> #endif

Yeah, I'm afraid I come from a time when you couldn't assume the
compiler would eliminate the resulting dead code, or at least would
complain about 'unreachable code' afterwards. I'm easy though.

-- 
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20151117/ada7ef7a/attachment.sig>


More information about the xorg-devel mailing list