Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Mar 2008 20:54:07 +1100
From:      Peter Jeremy <peterjeremy@optushome.com.au>
To:        Roman Divacky <rdivacky@freebsd.org>
Cc:        cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, Jung-uk Kim <jkim@freebsd.org>
Subject:   Re: cvs commit: src/usr.sbin/moused moused.c
Message-ID:  <20080306095407.GS68971@server.vk2pj.dyndns.org>
In-Reply-To: <20080306092045.GA54220@freebsd.org>
References:  <200803060022.m260MHSx017085@repoman.freebsd.org> <20080306092045.GA54220@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--rmUrFcWP4LYae1gV
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Mar 06, 2008 at 10:20:45AM +0100, Roman Divacky wrote:
>On Thu, Mar 06, 2008 at 12:22:17AM +0000, Jung-uk Kim wrote:
>>   Prefer clock_gettime(2) over gettimeofday(2) and use CLOCK_MONOTONIC_F=
AST.
>>   It is only used to track elapsed time and it does not have to be preci=
se.
>
>what is the rationale behind this? what is the expected improvement? I am
>not questioning the change I am just curious..

There's been a recent extensive thread about poor X11 performance and
it turns out the the Xserver can issue multiple gettimeofday(2) calls
every time it sees a mouse movement.  gettimeofday(2) on FreeBSD is
relatively expensive (the Project chose accuracy over speed) and
clock_gettime(2) using CLOCK_MONOTONIC_FAST is a much cheaper
alternative when accuracy isn't critical.

The Xserver should be using clock_gettime(2) but there's a bug in its
POSIX-compatibility selection.  Applying a similar fix to moused is a
logical extension.

--=20
Peter Jeremy
Please excuse any delays as the result of my ISP's inability to implement
an MTA that is either RFC2821-compliant or matches their claimed behaviour.

--rmUrFcWP4LYae1gV
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iD8DBQFHz78//opHv/APuIcRAn5qAJ4z04U2duhzn6jECW6xbnoE/7DydACgkCOZ
FJQrxClqsbproXKtw/roHKI=
=4iCj
-----END PGP SIGNATURE-----

--rmUrFcWP4LYae1gV--



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