From owner-svn-src-projects@FreeBSD.ORG Sat Dec 15 11:33:48 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 95F3CDDF; Sat, 15 Dec 2012 11:33:48 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail04.syd.optusnet.com.au (mail04.syd.optusnet.com.au [211.29.132.185]) by mx1.freebsd.org (Postfix) with ESMTP id 2B35D8FC1A; Sat, 15 Dec 2012 11:33:47 +0000 (UTC) Received: from c122-106-175-26.carlnfd1.nsw.optusnet.com.au (c122-106-175-26.carlnfd1.nsw.optusnet.com.au [122.106.175.26]) by mail04.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id qBFBXit5013499 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 15 Dec 2012 22:33:45 +1100 Date: Sat, 15 Dec 2012 22:33:44 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Alexander Motin Subject: Re: svn commit: r244249 - projects/calloutng/sys/dev/syscons In-Reply-To: <201212151044.qBFAiG70038633@svn.freebsd.org> Message-ID: <20121215222500.Q2309@besplex.bde.org> References: <201212151044.qBFAiG70038633@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=Zr21sKHG c=1 sm=1 a=AFSbx5kqTE4A:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=wCsoRhDgRdIA:10 a=erij_lOHUfb5hJlRUF0A:9 a=CjuIK1q_8ugA:10 a=bxQHXO5Py4tHmhUgaywp5w==:117 Cc: svn-src-projects@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2012 11:33:48 -0000 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