Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Feb 2013 11:15:02 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        Andriy Gapon <avg@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r246282 - in head/sys: conf kern
Message-ID:  <201302051115.03275.jhb@freebsd.org>
In-Reply-To: <51102076.8030302@FreeBSD.org>
References:  <201302030957.r139vd8n027213@svn.freebsd.org> <201302041429.01477.jhb@freebsd.org> <51102076.8030302@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302051115.03275.jhb>