From owner-svn-src-projects@FreeBSD.ORG Sat Dec 15 11:42:19 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 17E0C12D; Sat, 15 Dec 2012 11:42:19 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 6CE9B8FC0A; Sat, 15 Dec 2012 11:42:17 +0000 (UTC) Received: by mail-we0-f182.google.com with SMTP id u54so1974979wey.13 for ; Sat, 15 Dec 2012 03:42:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=nnyEUYemdQ6n3Xr9XBYY7Xci8CJTOnaKJywiLYvEenw=; b=gMR0zXG3dFltjqt2dB6NVaESO1Pop+PeB6j6Zvqn2bbNYXYfR4grc/TJPysdWnkv+B vy8mgTBqAdsfmf1gkqVO2JdSLZEaL1DyK/hRR9plfSDmdf8S6ThOTIzqTvDAGt1e8mWf Oh91UUbBJQXdfrXQYRZLyYfJK12++LeNcbktAhfA2IXmdcpCwMem5U96y5i10ljRYhF+ Ll6KSSliJNM/nsG3FUK0vsdj/bkGsiKhjPI06alukU2B5bb+bHFfGxOZRjYdL71+/a+t dEep5gqqUyY+ruzkyZaZMYrgPFJQmU1cD6/rJXtyMjb+Iy3UvE5ru5x/W1zAZWfaaKFZ EBag== Received: by 10.194.19.10 with SMTP id a10mr8108119wje.45.1355571730695; Sat, 15 Dec 2012 03:42:10 -0800 (PST) Received: from mavbook.mavhome.dp.ua (mavhome.mavhome.dp.ua. [213.227.240.37]) by mx.google.com with ESMTPS id gz3sm1718101wib.2.2012.12.15.03.42.08 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 15 Dec 2012 03:42:09 -0800 (PST) Sender: Alexander Motin Message-ID: <50CC620F.9040005@FreeBSD.org> Date: Sat, 15 Dec 2012 13:42:07 +0200 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120628 Thunderbird/13.0.1 MIME-Version: 1.0 To: Bruce Evans Subject: Re: svn commit: r244249 - projects/calloutng/sys/dev/syscons References: <201212151044.qBFAiG70038633@svn.freebsd.org> <20121215222500.Q2309@besplex.bde.org> In-Reply-To: <20121215222500.Q2309@besplex.bde.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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:42:19 -0000 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