minidump size on amd64

From: Andriy Gapon <avg_at_freebsd.org>
Date: Mon, 27 Sep 2010 20:54:17 +0300
It seems that minidump on amd64 is always dumping at least about 1GB of data
regardless of actual memory size and usage and thus can be even larger than
regular dump.

Specifically, I suspect the following code:
for (va = VM_MIN_KERNEL_ADDRESS; va < MAX(KERNBASE + NKPT * NBPDR,
    kernel_vm_end); va += NBPDR) {
        i = (va >> PDPSHIFT) & ((1ul << NPDPEPGSHIFT) - 1);
        /*
         * We always write a page, even if it is zero. Each
         * page written corresponds to 2MB of space
         */
        ptesize += PAGE_SIZE;

It seems that difference between KERNBASE and VM_MIN_KERNEL_ADDRESS is already
~500G.  Which means 500G divided by 2M equals 250K iterations/pages.  Which is 1GB
of data.

Looks like this came from amd64 KVA expansion.
And it seems a little bit wasteful?

-- 
Andriy Gapon
Received on Mon Sep 27 2010 - 15:54:21 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:07 UTC