From owner-freebsd-current@FreeBSD.ORG Mon Dec 6 16:38:31 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 16B31106566C; Mon, 6 Dec 2010 16:38:31 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.freebsd.org (Postfix) with ESMTP id CC8588FC08; Mon, 6 Dec 2010 16:38:30 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.4/8.14.4) with ESMTP id oB6GcU01067499; Mon, 6 Dec 2010 08:38:30 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.4/8.14.4/Submit) id oB6GcUNf067495; Mon, 6 Dec 2010 08:38:30 -0800 (PST) (envelope-from sgk) Date: Mon, 6 Dec 2010 08:38:30 -0800 From: Steve Kargl To: John Baldwin Message-ID: <20101206163830.GA53157@troutmask.apl.washington.edu> References: <20101205231829.GA68156@troutmask.apl.washington.edu> <201012060944.03196.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201012060944.03196.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i 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 16:38:31 -0000 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. > > > > 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 = 1.067100e-04 > > 69.55 real 38.39 user 30.94 sys > > Max ULP: 0.501607 for x in [-18.000000:88.709999] with dx = 1.067100e-04 > > 68.82 real 40.95 user 27.60 sys > > > > 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. > > The user/sys thing is a hack (and has been). We sample the PC at stathz (~128 > hz) to figure out a user vs sys split and use that to divide up the total > runtime (which actually is fairly accurate). All you need is for the clock > ticks to fire just a bit differently between runs to get a swing in user vs > system time. > > What I would like is to keep separate raw bintime's for user vs system time in > the raw data instead, but that would involve checking the CPU ticker more > often (e.g. twice for each syscall, interrupt, and trap in addition to the > current once per context switch). So far folks seem to be more worried about > the extra overhead rather than the loss of accuracy. > John, 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. -- Steve