From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 21:21:23 2014 Return-Path: Delivered-To: svn-src-all@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 824A1C77; Mon, 20 Jan 2014 21:21:23 +0000 (UTC) Received: from felyko.com (felyko.com [174.136.100.2]) by mx1.freebsd.org (Postfix) with ESMTP id 645F21D0C; Mon, 20 Jan 2014 21:21:23 +0000 (UTC) Received: from rui-macbook-pro.apple.com (unknown [17.193.13.39]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by felyko.com (Postfix) with ESMTPSA id 6896A39828; Mon, 20 Jan 2014 13:21:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=felyko.com; s=mail; t=1390252877; bh=gZBSuVqUnJoVmRb+VkwgShwQBS1w4E5DXa4eWtFEdhk=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=Id9h1S1JrMDAtODIpFbYjlBQL5oKLicV/Oi8JCoKb3YZbcDrgDZE2oB/7UBJhf9Wo 4qIOLfaoPDeeUaMpsSVabeDFEwZfAv2kBpCiv7db+fq7H9rRcTCVvGSlSC1uHnNhsx 7VHCBPNKEtUx8/vV/J3w7KqdoRFUxhYVWxV631qQ= Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1864\)) Subject: Re: svn commit: r260898 - head/sys/kern From: Rui Paulo In-Reply-To: <1536225.gsjt6oXMt2@pippin.baldwin.cx> Date: Mon, 20 Jan 2014 13:21:13 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <71438498-A67C-4C7D-8C8B-4A9C199AC1B1@felyko.com> References: <201401200159.s0K1xa5X012123@svn.freebsd.org> <1536225.gsjt6oXMt2@pippin.baldwin.cx> To: John Baldwin X-Mailer: Apple Mail (2.1864) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Neel Natu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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: Mon, 20 Jan 2014 21:21:23 -0000 On 20 Jan 2014, at 08:32, John Baldwin wrote: > On Sunday 19 January 2014 18:18:03 Rui Paulo wrote: >> On 19 Jan 2014, at 17:59, Neel Natu wrote: >>> Author: neel >>> Date: Mon Jan 20 01:59:35 2014 >>> New Revision: 260898 >>> URL: http://svnweb.freebsd.org/changeset/base/260898 >>>=20 >>> Log: >>> Bump up WITNESS_COUNT from 1024 to 1536 so there are sufficient = entries >>> for >>> WITNESS to actually work. >>=20 >> This value should be automatically tuned... >=20 > How do you propose to do so? This is the count of locks initialized = before=20 > witness' own SYSINIT is executed and the array it sizes is allocated=20= > statically at compile time. Witness is never used (witness_cold) until witness_initialise() is = called, right? > This used to not be a static array, but an > intrusive list embedded in locks themselves, but we decided to shave a > pointer off of each lock that was only used for that and to use a = statically=20 > sized table instead. Why don=92t we start with a static value (say 1024) and then = reinitialise and copy array if it doesn=92t fit instead of crashing the = kernel? -- Rui Paulo