From owner-freebsd-current@FreeBSD.ORG Mon Dec 6 17:35:39 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D675A106566B; Mon, 6 Dec 2010 17:35:39 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 57CBA8FC0A; Mon, 6 Dec 2010 17:35:35 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id oB6HZWcx067133 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 6 Dec 2010 19:35:32 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id oB6HZVer009266; Mon, 6 Dec 2010 19:35:31 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id oB6HZVsB009265; Mon, 6 Dec 2010 19:35:31 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 6 Dec 2010 19:35:31 +0200 From: Kostik Belousov To: Steve Kargl Message-ID: <20101206173531.GI2417@deviant.kiev.zoral.com.ua> References: <20101205231829.GA68156@troutmask.apl.washington.edu> <201012060944.03196.jhb@freebsd.org> <20101206163830.GA53157@troutmask.apl.washington.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="N8NGGaQn1mzfvaPg" Content-Disposition: inline In-Reply-To: <20101206163830.GA53157@troutmask.apl.washington.edu> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_40, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-current@freebsd.org Subject: Re: Process accounting/timing has broken recently X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Dec 2010 17:35:40 -0000 --N8NGGaQn1mzfvaPg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 06, 2010 at 08:38:30AM -0800, Steve Kargl wrote: > On Mon, Dec 06, 2010 at 09:44:03AM -0500, John Baldwin wrote: > > On Sunday, December 05, 2010 6:18:29 pm Steve Kargl wrote: > > > Sometime in the last 7-10 days, some one made a > > > change that has broken process accounting/timing. > > >=20 > > > laptop:kargl[42] foreach i ( 0 1 2 3 4 5 6 7 8 9 ) > > > foreach? time ./testf > > > foreach? end > > > Max ULP: 0.501607 for x in [-18.000000:88.709999] with dx =3D 1.06710= 0e-04 > > > 69.55 real 38.39 user 30.94 sys > > > Max ULP: 0.501607 for x in [-18.000000:88.709999] with dx =3D 1.06710= 0e-04 > > > 68.82 real 40.95 user 27.60 sys > > >=20 > > > testf is a numerically intensive program that tests the > > > accuracy of expf() in a tight loop. User time varies > > > by ~3 seconds on my lightly loaded 2 GHz core2 duo processor. > > > I'm fairly certain that the code does not suddenly grow/loose > > > 6 GFLOP of operations. > >=20 > > The user/sys thing is a hack (and has been). We sample the PC at stath= z (~128=20 > > hz) to figure out a user vs sys split and use that to divide up the tot= al=20 > > runtime (which actually is fairly accurate). All you need is for the c= lock=20 > > ticks to fire just a bit differently between runs to get a swing in use= r vs=20 > > system time. > >=20 > > What I would like is to keep separate raw bintime's for user vs system = time in=20 > > the raw data instead, but that would involve checking the CPU ticker mo= re=20 > > often (e.g. twice for each syscall, interrupt, and trap in addition to = the=20 > > current once per context switch). So far folks seem to be more worried= about=20 > > the extra overhead rather than the loss of accuracy. > >=20 >=20 > John, >=20 > Thanks for the comment. It seems this splitting has become > worse (for some definition of worse) in that previously the > user time variation was on the order of tenth of a second not > seconds. In thinking about the issue, I recalled that some > changes to npx.c were committed 10 days ago. Perhaps, there > is slightly more context switch overhead in dealing with the > FPU registers, and this has increased the sys time. If you can confirm this statement, it would be interesting. Otherwise, I claim that the changes did not affected the context switch path at all. The changes were mostly relevant for context(2) family of functions and debugger access to the FPU register file. --N8NGGaQn1mzfvaPg Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAkz9HuIACgkQC3+MBN1Mb4goigCfUrSmv4GQAdPe5Tf+AvXj/IUp aScAoMbFtZxNXw0Ne0vw/p8qZKTVsq1T =VWQx -----END PGP SIGNATURE----- --N8NGGaQn1mzfvaPg--