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

--- Comment #12 from Stefan Roesch <[email protected]> ---
I can see the following call sequence:

procstat
-> calls proctstat_getvmmap and checks KVME_FLAG_SUPER
-> calls kinfo_getvmmap
-> sysctl kern.proc.vmmap

The flag KVME_FLAG_SUPER is set in sys/kern/kern_proc.c in the
function kern_proc_vmmap_out().

-> calls kern_proc_vmmap_resident()
     sets super flag based on the super parameter
   -> calls pmap_mincore() + does some other checks
         and checks if MINCORE_SUPER is set
          It doesn't set MINCORE_SUPER directly, but instead uses
             MINCORE_PSIND(i)›   (((i) << MINCORE_PSIND_SHIFT) & MINCORE_SUPER)

There are two cases
 - We have a PDP and its valid and page size is 2M
     MINCORE_PSIND(2)   ==> (2 << 5) & 0x60
                               1000000
                               1100000
                             ->1000000
 - We have PD and its valid and pagesize is 2M
     MINCORE_PSIND(1)   ==> (1 << 5) & 0x60
                                100000
                               1100000
                               0100000

If I use a dtrace script, I can see that kern_proc_vmmap_resident gets
called. However, pmap_mincore() gets never called. There are 3
conditions:
    - m->psind
    - addr + pagesizes[1] <= entry->end
    - (addr & (pagesize[1] - 1)) == 0

Needs further debugging to determine which of the conditions fails.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to