Skip to content

Commit

Permalink
Preset the object's color, or alignment, to maximize superpage usage.
Browse files Browse the repository at this point in the history
MFC after:	5 days
  • Loading branch information
alcriceedu committed Feb 13, 2015
1 parent 217bb22 commit c8abad0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sys/kern/sysv_shm.c
Original file line number Diff line number Diff line change
Expand Up @@ -706,9 +706,10 @@ shmget_allocate_segment(td, uap, mode)
#endif
return (ENOMEM);
}
shm_object->pg_color = 0;
VM_OBJECT_WLOCK(shm_object);
vm_object_clear_flag(shm_object, OBJ_ONEMAPPING);
vm_object_set_flag(shm_object, OBJ_NOSPLIT);
vm_object_set_flag(shm_object, OBJ_COLORED | OBJ_NOSPLIT);
VM_OBJECT_WUNLOCK(shm_object);

shmseg->object = shm_object;
Expand Down

0 comments on commit c8abad0

Please sign in to comment.