https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242427

--- Comment #3 from Peter Eriksson <p...@lysator.liu.se> ---
(In reply to Mark Johnston from comment #1)

# sysctl vm.pmap
vm.pmap.pdpe.demotions: 3
vm.pmap.pde.promotions: 18422
vm.pmap.pde.p_failures: 1050
vm.pmap.pde.mappings: 11065
vm.pmap.pde.demotions: 1546
vm.pmap.allow_2m_x_ept: 1
vm.pmap.pcid_save_cnt: 2609830
vm.pmap.pti: 1
vm.pmap.invpcid_works: 1
vm.pmap.pcid_enabled: 1
vm.pmap.pg_ps_enabled: 1
vm.pmap.pat_works: 1

As for the questsions from Konstantin:

CPU: Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz (2100.04-MHz K8-class CPU)
FreeBSD/SMP: 2 package(s) x 8 core(s) x 2 hardware threads

hw.ncpu: 32

FreeBSD 11.3-RELEASE-p5


The measurements are very simple, one example from sys/vm/vm_kern.c

> extern int verbose_shutdown; /* sysctl kern.shutdown.verbose, defined 
> elsewhere */
>
> void
> kmem_unback(vm_object_t object, vm_offset_t addr, vm_size_t size)
> {
>        vm_page_t m, next;
>        vm_offset_t end, offset;
>        time_t t0;
>        int dt;
>
>        KASSERT(object == kmem_object || object == kernel_object,
>            ("kmem_unback: only supports kernel objects."));
>
>        if (verbose_shutdown > 3)
>          t0 = time_second;
>
>        pmap_remove(kernel_pmap, addr, addr + size);
>
>        if (verbose_shutdown > 3) {
>          dt = time_second - t0;
>          if (dt > 0)
>            printf("kmem_unback: pmap_remove(kernel_pmap, %lu, %lu) took %d 
> seconds\n",
>                   (unsigned long) addr, (unsigned long) addr+size, dt);
>          t0 = time_second;
>        }

The printed messages when dt is 1 (or more, but that hasn't happened yet)
perfectly matches with the time spent (when measured "higher up" in the call
chain and measured by a wall clock).

(The resultion of time_second is seconds so probably should change to something
with a bit higher resolution if I'd really wanna know how long time
pmap_remove() takes)

I haven't tested an INVARIANTS build yet, but will do that...

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to