1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

Provide a temporary undocumented option: SHM_PHYS_BACKED. This will

become sysctl and/or flags controlled later.  It's mainly here for an
easy place to test the physical memory backed objects.
This commit is contained in:
Peter Wemm 2000-05-21 13:52:13 +00:00
parent 249645144d
commit 24488c7498
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=60758
5 changed files with 9 additions and 0 deletions

View File

@ -2363,6 +2363,7 @@ options SHMMAXPGS=1025
options SHMMIN=2
options SHMMNI=33
options SHMSEG=9
options SHM_PHYS_BACKED
options SHOW_BUSYBUFS # List buffers that prevent root unmount
options SIMPLELOCK_DEBUG
options SI_DEBUG

View File

@ -73,6 +73,7 @@ SHMMAXPGS opt_sysvipc.h
SHMMIN opt_sysvipc.h
SHMMNI opt_sysvipc.h
SHMSEG opt_sysvipc.h
SHM_PHYS_BACKED opt_sysvipc.h
SEMMAP opt_sysvipc.h
SEMMNI opt_sysvipc.h
SEMMNS opt_sysvipc.h

View File

@ -2363,6 +2363,7 @@ options SHMMAXPGS=1025
options SHMMIN=2
options SHMMNI=33
options SHMSEG=9
options SHM_PHYS_BACKED
options SHOW_BUSYBUFS # List buffers that prevent root unmount
options SIMPLELOCK_DEBUG
options SI_DEBUG

View File

@ -2363,6 +2363,7 @@ options SHMMAXPGS=1025
options SHMMIN=2
options SHMMNI=33
options SHMSEG=9
options SHM_PHYS_BACKED
options SHOW_BUSYBUFS # List buffers that prevent root unmount
options SIMPLELOCK_DEBUG
options SI_DEBUG

View File

@ -528,8 +528,13 @@ shmget_allocate_segment(p, uap, mode)
* We make sure that we have allocated a pager before we need
* to.
*/
#ifdef SHM_PHYS_BACKED
shm_handle->shm_object =
vm_pager_allocate(OBJT_PHYS, 0, size, VM_PROT_DEFAULT, 0);
#else
shm_handle->shm_object =
vm_pager_allocate(OBJT_SWAP, 0, size, VM_PROT_DEFAULT, 0);
#endif
vm_object_clear_flag(shm_handle->shm_object, OBJ_ONEMAPPING);
vm_object_set_flag(shm_handle->shm_object, OBJ_NOSPLIT);