vm_object: add a place for more flags, which uses a hole on 64bit systems sysv_ipc: remove sys/cdefs.h include vm_object: add OBJ2_SYSVSHM flag2 to indicate SysV shm backing object sysvshm: add shmobjinfo() function to find key/seq of the segment backed by obj kinfo_vmentry: report mappings of the SysV shm segments Mark such mappings with the new flag KVME_FLAG_SYSVSHM. Provide segment key in kve_vn_fileid, vnode never can back shm mapping. Provide sequence number in kve_vn_fsid_freebsd11. kinfo_vmobject: report backing object of the SysV shm segments Use reserved work for kvo_flags. Mark such object with KVMO_FLAG_SYSVSHM. Provide segment key in kvo_vn_fileid, vnode never can back shm mapping. Provide sequence number in kvo_vn_fsid_freebsd11. procstat vm: report SysV shm segment mapping Also print its key and sequence number. vmstat -o: report objects backing SysV shm segments
Details
- Reviewers
markj emaste - Commits
- rG2d84f79c4e45: vmstat -o: report objects backing SysV shm segments
rG65b832eb6ff7: procstat vm: report SysV shm segment mapping
rG6a3fbdc7e9c8: kinfo_vmobject: report backing object of the SysV shm segments
rGd3dd6bd40395: kinfo_vmentry: report mappings of the SysV shm segments
rGb72029589e64: sysvshm: add shmobjinfo() function to find key/seq of the segment backed by obj
rGf186252e0d6e: vm_object: add OBJ_SYSVSHM flag to indicate SysV shm backing object
rG34935a6b3723: vm_object: reformat flags definitions
rG8771dc950a46: sysv_ipc: remove sys/cdefs.h include
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
sys/kern/sysv_shm.c | ||
---|---|---|
1055–1056 | Need to set the new hook to NULL here. | |
sys/vm/vm_object.h | ||
112 | I never committed D35905. :( I would prefer that, instead of having a second flag field. Do you agree? If so, I'll push it. | |
usr.bin/procstat/procstat_vm.c | ||
170 | The parameters are unsigned, this looks like it should be %ju:%u. | |
usr.bin/vmstat/vmstat.c | ||
1543 | We want the uintmax_t cast here too, no? |
sys/kern/sysv_shm.c | ||
---|---|---|
875 | What if we don't identify the object for some reason, e.g., we're racing with destruction? Then these return values are left uninitialized. Probably we should set some default values, or use a return value to indicate whether the object was found or not. |
sys/kern/sysv_shm.c | ||
---|---|---|
875 | This is why the hook itself pre-sets the *key and *seq to zero. I do not think it is needed to do more. |
sys/kern/sysv_shm.c | ||
---|---|---|
875 | I see, I missed a layer of indirection. But the problem is still there if options SYSVSHM is defined. |
usr.bin/procstat/procstat_vm.c | ||
---|---|---|
173 | Is the intent that we will print the sysvshm identifier, or a path, or nothing? I would put an else here to make that more clear. |
usr.bin/procstat/procstat_vm.c | ||
---|---|---|
173 | I want to see how hard is to report posixshm name as the next step, then I will see how to make this block final. |