From owner-svn-src-head@FreeBSD.ORG Tue Feb 5 16:45:47 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 2B3938FA; Tue, 5 Feb 2013 16:45:47 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 019B4837; Tue, 5 Feb 2013 16:45:47 +0000 (UTC) Received: from pakbsde14.localnet (unknown [38.105.238.108]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 54C38B97C; Tue, 5 Feb 2013 11:45:46 -0500 (EST) From: John Baldwin To: Andriy Gapon Subject: Re: svn commit: r246282 - in head/sys: conf kern Date: Tue, 5 Feb 2013 11:15:02 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p22; KDE/4.5.5; amd64; ; ) References: <201302030957.r139vd8n027213@svn.freebsd.org> <201302041429.01477.jhb@freebsd.org> <51102076.8030302@FreeBSD.org> In-Reply-To: <51102076.8030302@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201302051115.03275.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 05 Feb 2013 11:45:46 -0500 (EST) 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.14 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: Tue, 05 Feb 2013 16:45:47 -0000 On Monday, February 04, 2013 3:56:22 pm Andriy Gapon wrote: > on 04/02/2013 21:29 John Baldwin said the following: > > On Sunday, February 03, 2013 4:57:39 am Andriy Gapon wrote: > >> Author: avg > >> Date: Sun Feb 3 09:57:39 2013 > >> New Revision: 246282 > >> URL: http://svnweb.freebsd.org/changeset/base/246282 > >> > >> Log: > >> allow for large KTR_ENTRIES values by allocating ktr_buf using malloc(9) > >> > >> Only during very early boot, before malloc(9) is functional (SI_SUB_KMEM), > >> the static ktr_buf_init is used. Size of the static buffer is determined > >> by a new kernel option KTR_BOOT_ENTRIES. Its default value is 1024. > >> > >> This commit builds on top of r243046. > > > > Does this lose "early" entries once the SYSINIT runs? It doesn't seem to make > > any effort to copy the existing entries over to the new buffer? > > Yes, this is true and glebius has also noticed that... > I think that a simple bcopy should be fine here? Almost. To handle the case where the boot buffer might have wrapped I think you should copy the entries at the "end" into the head of the KTR buffer first, then the entries from the front to the current index, and then update the index to point at the end (it should effectively be KTR_BOOT_ENTRIES I think). -- John Baldwin