From owner-cvs-all@FreeBSD.ORG Thu Mar 6 09:54:11 2008 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0CF6C1065676; Thu, 6 Mar 2008 09:54:11 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail15.syd.optusnet.com.au (mail15.syd.optusnet.com.au [211.29.132.196]) by mx1.freebsd.org (Postfix) with ESMTP id 9061F8FC28; Thu, 6 Mar 2008 09:54:10 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from server.vk2pj.dyndns.org (c220-239-20-82.belrs4.nsw.optusnet.com.au [220.239.20.82]) by mail15.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m269s8PA001887 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 6 Mar 2008 20:54:08 +1100 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.2/8.14.1) with ESMTP id m269s7Uf069292; Thu, 6 Mar 2008 20:54:07 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.2/8.14.2/Submit) id m269s7Q8069291; Thu, 6 Mar 2008 20:54:07 +1100 (EST) (envelope-from peter) Date: Thu, 6 Mar 2008 20:54:07 +1100 From: Peter Jeremy To: Roman Divacky Message-ID: <20080306095407.GS68971@server.vk2pj.dyndns.org> References: <200803060022.m260MHSx017085@repoman.freebsd.org> <20080306092045.GA54220@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rmUrFcWP4LYae1gV" Content-Disposition: inline In-Reply-To: <20080306092045.GA54220@freebsd.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.17 (2007-11-01) Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, Jung-uk Kim Subject: Re: cvs commit: src/usr.sbin/moused moused.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 09:54:11 -0000 --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--