svn commit: r244249 - projects/calloutng/sys/dev/syscons

Alexander Motin mav at FreeBSD.org
Sat Dec 15 11:42:19 UTC 2012


On 15.12.2012 13:33, Bruce Evans wrote:
> On Sat, 15 Dec 2012, Alexander Motin wrote:
>
>> Log:
>>  Switch syscons from timeout() to callout_reset_flags() and specify that
>>  precision is not important there -- anything from 20 to 30Hz will be
>> fine.
>
> 20-30 is still a lot.  It could use adaptive timeouts of many seconds
> when there is no i/o, except for the blinking cursor.  OTOH, precision
> might be important for the blinking cursor -- it would probably be
> even more distracting if it has uneven timing.

Yes, that's true. I just don't know syscons internals to do it. Somebody 
is welcome to do it, as syscons now is the main source of time events.

>> Modified: projects/calloutng/sys/dev/syscons/syscons.c
>> ==============================================================================
>>
>> --- projects/calloutng/sys/dev/syscons/syscons.c    Sat Dec 15
>> 10:30:06 2012    (r244248)
>> +++ projects/calloutng/sys/dev/syscons/syscons.c    Sat Dec 15
>> 10:44:16 2012    (r244249)
>> ...
>> @@ -1831,7 +1833,8 @@ scrn_timer(void *arg)
>>     /* don't do anything when we are performing some I/O operations */
>>     if (suspend_in_progress || sc->font_loading_in_progress) {
>>     if (again)
>> -        timeout(scrn_timer, sc, hz / 10);
>> +        callout_reset_flags(&sc->ctimeout, hz / 15, scrn_timer, sc,
>> +        C_PRELSET(0));
>>     return;
>>     }
>>     s = spltty();
>
> Why reduce the timeout?

Respecting specified precision, it will be 7.5-15Hz. I just tried to 
stay about original value. Also that seems to be a rare case and so not 
really important.

>> ...
>> @@ -1899,7 +1903,8 @@ scrn_timer(void *arg)
>> #endif
>>
>>     if (again)
>> -    timeout(scrn_timer, sc, hz / 25);
>> +    callout_reset_flags(&sc->ctimeout, hz / 30, scrn_timer, sc,
>> +        C_PRELSET(1));
>>     splx(s);
>> }
>
> Most syscons timeouts except this were hz / 10.  Now they are hz / 15.
> I increase this one too to hz / 10 in some kernels, and have never noticed
> the difference.  The update rate for a movie needs to be 100 or 200 Hz,
> but for some reason an update rate of just 10 Hz is enough for syscons.
> At least for me.  I notice flicker at 60 Hz.

My laptops are running at 10Hz, but I don't know average user wishes, so 
prefer to leave it as-is.

-- 
Alexander Motin


More information about the svn-src-projects mailing list