From owner-svn-src-all@FreeBSD.ORG Sat Aug 2 07:44:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 15150B19; Sat, 2 Aug 2014 07:44:48 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id EE1DB2D10; Sat, 2 Aug 2014 07:44:47 +0000 (UTC) Received: from delphij-macbook.local (unknown [IPv6:2001:470:83bf:0:4d5e:b0a6:7ed2:e5b2]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id 857FDAAD4; Sat, 2 Aug 2014 00:44:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1406965481; x=1406979881; bh=NuMF7hge1WMefia7X4HGCdRMHCEQIm5GsGKAinWLlgU=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=J9oqFUplZ+M1P+yrZaBd9XGHBswNX/KI06X31cpP8+dJQW95eTZ/L1RsrF6g9cWKc 8IKYePmXEMr3tSNy0MV4sXi69MMOSInf1rAjAG+9CLcGWFmQX3EpTAEDs6oUUH1KFh CRQSiY7orzJVqJhp1w1jsYKJ+eJisCz+IUZcY7b8= Message-ID: <53DC96E9.9020805@delphij.net> Date: Sat, 02 Aug 2014 00:44:41 -0700 From: Xin Li Reply-To: d@delphij.net Organization: The FreeBSD Project MIME-Version: 1.0 To: "Justin T. Gibbs" , Xin LI Subject: Re: svn commit: r269404 - head/sys/cddl/compat/opensolaris/sys References: <201408012233.s71MXNIx051919@svn.freebsd.org> <57D656EF-5D6B-428B-9DCE-7FA360B1407F@scsiguy.com> In-Reply-To: <57D656EF-5D6B-428B-9DCE-7FA360B1407F@scsiguy.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, "mav >> Alexander Motin" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Aug 2014 07:44:48 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 8/1/14 8:59 PM, Justin T. Gibbs wrote: > 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 >> >> 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. >> >> 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: >> >> panic: avl_find() succeeded inside avl_add() > > I don’t 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’t we just use a > PCPU counter and tag the dbufs with "CPU# << 48 | PCPU_counter”? What do you think about D521? (Alexander suggested similar implementation). https://phabric.freebsd.org/D521 Cheers, -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJT3JboAAoJEJW2GBstM+nsq7wP/j+QfLnkTVTIgFWk15L2haeo V6lPD2GwjggxGn50S9+POOiB1V4kZwTEydkEJ+4vMXkH+Evke5p0eYObF7Ye1ejc UqprnIuEK3N63YkbX2tNkIX22zCJd5KKvnHjWd7IR88c2XT2doPwo+o9IsaWFdrW Gn2FYr1hsw3Pi5PKytzEhc1zOpBa/kXy6gy9ZDOjBCnUXjL6v29GlOa5L+VLCOtG mGpiVdWl18unLW+x0uoT4AfDVeyNYJGIDMzzV5OBtLp14fcDCcWPswwpq4VMDdrf ZWLarOahwpjD7eO9MHFMXgtrZVzj7qY3xXJJDsiNWv109TwOvHx9NmYAVtP3CT3g T5QrkXJzuWJlIsBAX1bHtdLMRRAdSTDN8q9XE3r+2TJ1NUpazEEkA7iRpXLrlvbP rEyFGjr3CEKdGQXMdGx3kpqgqYLRAdo3MdXQIXU/OpWY3CAqm82ljQtqHmfuDHO1 Kb5rcqLxApKaxGqoq7GnZH5vHfrU9ulaYBBTykV3PyCGV5A4p4FWUJBUaS/FaKZv +w53o87L+LRPniyPU5V6i18I/M2X3mIGzUCv+i5oK7ac0O5hMOkORXVs8KTiQ7DG zCzw2eUG26cDGDGPzpixvVKPBKqFTDROQIttmtm5x234zESFINtS534Hdl+XAsDh zSVHaNCcebZ0RYiphbd3 =fb7k -----END PGP SIGNATURE-----