Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Dec 2012 22:33:44 +1100 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Alexander Motin <mav@freebsd.org>
Cc:        svn-src-projects@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r244249 - projects/calloutng/sys/dev/syscons
Message-ID:  <20121215222500.Q2309@besplex.bde.org>
In-Reply-To: <201212151044.qBFAiG70038633@svn.freebsd.org>
References:  <201212151044.qBFAiG70038633@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

> 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?

> ...
> @@ -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.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121215222500.Q2309>