Preset the object's color, or alignment, to maximize superpage usage.
MFC after: 5 days
This commit is contained in:
parent
d5153415b8
commit
f4c6aea395
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=278402
@ -531,9 +531,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…
Reference in New Issue
Block a user