Difference between p_vmspace quota between stable/11 and stable/10
Konstantin Belousov
kostikbel at gmail.com
Thu May 25 14:55:40 UTC 2017
On Thu, May 25, 2017 at 01:13:39AM -0700, Shrikanth Kamath wrote:
> Thanks for the reply Konstantin, I captured the procstat -v snapshots
> for the forked process (got the readings for both stable/10 vs
> stable/11). I am still trying to figure how to interpret these
> mappings,
>
> In stable/11 the first few lines of procstat -v show
>
> PID START END PRT RES PRES REF SHD FLAG TP PATH
>
> 19933 0x8048000 0x877e000 r-x 933 1003 2 1 CN--
> vn /packages/mnt/junos-platform/sbin/dcd
> 19933 0x877e000 0x87f2000 rw- 70 0 1 0 C---
> vn /packages/mnt/junos-platform/sbin/dcd
> 19933 0x87f2000 0x8a73000 rw- 59 59 1 0 C--- df
> 19933 0xc8797000 0xc87a1000 rw- 10 10 1 0 CN-- df
>
> The same for stable/10 show
>
> PID START END PRT RES PRES REF SHD FL TP PATH
>
> 43678 0x8048000 0x8779000 r-x 943 1014 2 1 CN--
> vn /packages/mnt/junos-platform/sbin/dcd
> 43678 0x8779000 0x87ed000 rw- 70 0 1 0 C---
> vn /packages/mnt/junos-platform/sbin/dcd
> 43678 0x87ed000 0x2cc00000 rw- 145872 145872 1 0 C-S- df
> 43678 0xc8792000 0xc879c000 rw- 10 10 1 0 C--- df
>
>
> The third entry in two cases show a stark difference, does this
> indicated the space that was setup was much lower compared to
> stable/10?
>
I am not sure what you mean by 'the space that was setup was much lower'.
Right after the mapping for the program' initialized data segment, follows a
BSS segment which grows into the sbrk segment. The mapping in stable/10
map which starts at address 0x87ed000 looks like grown sbrk segment due
to this. System does not mmap() something there, unless mmap is explicitely
asked to, by the 'address' argument, and perhaps MAP_FIXED flag.
Note that even in stable/10, jemalloc(3) uses mmap and not sbrk, so I
have no idea what that mapping is. Either you reconfigured jemalloc()
to use sbrk, or called sbrk in the program explicitely, or called mmap()
with the address hint in sbrk area.
You should ktrace your program to see what caused creation of the mapping.
More information about the freebsd-hackers
mailing list