From owner-svn-src-head@FreeBSD.ORG Sat Aug 2 03:59:17 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 086B1237; Sat, 2 Aug 2014 03:59:17 +0000 (UTC) Received: from aslan.scsiguy.com (mail.scsiguy.com [70.89.174.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC2442227; Sat, 2 Aug 2014 03:59:15 +0000 (UTC) Received: from [192.168.0.61] (jt-mbp.home.scsiguy.org [192.168.0.61]) (authenticated bits=0) by aslan.scsiguy.com (8.14.8/8.14.8) with ESMTP id s723x6ju016932 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 1 Aug 2014 21:59:09 -0600 (MDT) (envelope-from gibbs@scsiguy.com) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r269404 - head/sys/cddl/compat/opensolaris/sys From: "Justin T. Gibbs" In-Reply-To: <201408012233.s71MXNIx051919@svn.freebsd.org> Date: Fri, 1 Aug 2014 21:59:06 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <57D656EF-5D6B-428B-9DCE-7FA360B1407F@scsiguy.com> References: <201408012233.s71MXNIx051919@svn.freebsd.org> To: Xin LI X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Aug 2014 03:59:17 -0000 On Aug 1, 2014, at 4:33 PM, Xin LI wrote: > Author: delphij > Date: Fri Aug 1 22:33:23 2014 > New Revision: 269404 > URL: http://svnweb.freebsd.org/changeset/base/269404 >=20 > Log: > Split gethrtime() and gethrtime_waitfree() and make the former use > nanouptime() instead of getnanouptime(). nanouptime(9) provides more > precise result at expense of being slower. >=20 > In r269223, gethrtime() is used as creation time of dbuf, which in = turn > acts as portion of lookup key to maintain AVL invariant where there = can > not be duplicate items. Before this change, gethrtime() have = preferred > better execution time by sacrificing precision, which may lead to = panic > on busy systems with: >=20 > panic: avl_find() succeeded inside avl_add() I don=92t believe that r269223 requires a temporal ordering of the dbufs = in the AVL, just unique entries. So why use an expensive operation like = getting high resolution time? Can=92t we just use a PCPU counter and = tag the dbufs with "CPU# << 48 | PCPU_counter=94? =97 Justin=