Changeset View
Changeset View
Standalone View
Standalone View
sys/vm/vm_object.h
Show First 20 Lines • Show All 120 Lines • ▼ Show 20 Lines | struct vm_object { | ||||
union { | union { | ||||
/* | /* | ||||
* VNode pager | * VNode pager | ||||
* | * | ||||
* vnp_size - current size of file | * vnp_size - current size of file | ||||
*/ | */ | ||||
struct { | struct { | ||||
off_t vnp_size; | off_t vnp_size; | ||||
vm_ooffset_t writemappings; | |||||
} vnp; | } vnp; | ||||
/* | /* | ||||
* Device pager | * Device pager | ||||
* | * | ||||
* devp_pglist - list of allocated pages | * devp_pglist - list of allocated pages | ||||
*/ | */ | ||||
struct { | struct { | ||||
Show All 26 Lines | union { | ||||
* swp_blks - pc-trie of the allocated swap blocks. | * swp_blks - pc-trie of the allocated swap blocks. | ||||
* | * | ||||
*/ | */ | ||||
struct { | struct { | ||||
void *swp_tmpfs; | void *swp_tmpfs; | ||||
struct pctrie swp_blks; | struct pctrie swp_blks; | ||||
} swp; | } swp; | ||||
} un_pager; | } un_pager; | ||||
vm_ooffset_t writemappings; | |||||
kib: This increases each vm_object by 8 bytes. Objects are typically allocated for almost any… | |||||
struct ucred *cred; | struct ucred *cred; | ||||
vm_ooffset_t charge; | vm_ooffset_t charge; | ||||
void *umtx_data; | void *umtx_data; | ||||
}; | }; | ||||
/* | /* | ||||
* Flags | * Flags | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 172 Lines • Show Last 20 Lines |
This increases each vm_object by 8 bytes. Objects are typically allocated for almost any cached vnodes, and modern systems cache millions of vnodes.
With some efforts, you can put writemappings under swp structure, I believe. Then it should not increase the vm_object' size.
Did you coded it that way because shmfd starts as OBJT_DEFAULT ? You can safely change that to OBJT_SWAP.