MFC r278402
Preset the object's color, or alignment, to maximize superpage usage.
This commit is contained in:
parent
248744ce23
commit
48e295fadf
@ -554,9 +554,10 @@ shm_alloc(struct ucred *ucred, mode_t mode)
|
||||
shmfd->shm_object = vm_pager_allocate(OBJT_DEFAULT, NULL,
|
||||
shmfd->shm_size, VM_PROT_DEFAULT, 0, ucred);
|
||||
KASSERT(shmfd->shm_object != NULL, ("shm_create: vm_pager_allocate"));
|
||||
shmfd->shm_object->pg_color = 0;
|
||||
VM_OBJECT_WLOCK(shmfd->shm_object);
|
||||
vm_object_clear_flag(shmfd->shm_object, OBJ_ONEMAPPING);
|
||||
vm_object_set_flag(shmfd->shm_object, OBJ_NOSPLIT);
|
||||
vm_object_set_flag(shmfd->shm_object, OBJ_COLORED | OBJ_NOSPLIT);
|
||||
VM_OBJECT_WUNLOCK(shmfd->shm_object);
|
||||
vfs_timestamp(&shmfd->shm_birthtime);
|
||||
shmfd->shm_atime = shmfd->shm_mtime = shmfd->shm_ctime =
|
||||
|
Loading…
x
Reference in New Issue
Block a user