Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Jan 2018 19:21:16 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Hartmut Brandt <hartmut.brandt@dlr.de>
Cc:        hackers@freebsd.org
Subject:   Re: allocating large piece of contiguous kernel memory
Message-ID:  <20180125172116.GS55707@kib.kiev.ua>
In-Reply-To: <alpine.BSF.2.20.1801251747460.70702@KNOP-BEAGLE.kn.op.dlr.de>
References:  <alpine.BSF.2.20.1801251747460.70702@KNOP-BEAGLE.kn.op.dlr.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jan 25, 2018 at 05:52:57PM +0100, Hartmut Brandt wrote:
> Hi all,
> 
> for a device driver communicating with an FPGA I would like to allocate
> an 8GByte piece or two 4GByte pieces of contiguous memory in the device 
> driver. The machine is amd64 and has 256GByte.
> 
> The maximum I can allocate is 512MByte. If I try more (in one piece or in 
> two pieces) contigfree() crashes in pmap_resident_count_dec() with an 
> "pmap resident count underflow".
> 
> Is this something which is not supposed to work? Or is there something 
> tunable or is this a bug?

I suspect a bug. Print out the value of
kernel_pmap->pm_stats.resident_count before and after contigmalloc. Also
interesting are the values of the resident count and decrement at the
panic time (but they are already printed by the panic, you did not shown
them).




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