Subject: Re: SysV SHM locking and reallocating support
To: None <>
From: YAMAMOTO Takashi <>
List: tech-kern
Date: 09/25/2006 09:14:34
> Hello,
> here is an attached patch to support SysV IPC shared memory locking to
> physical memory by shmctl(2) SHM_LOCK/SHM_UNLOCK options. These options
> is not defined in standard, but exists in systems like Solaris, Linux,
> HP-UX and probably others. Also there is an sysctl's
> kern.ipc.shm_use.phys parameter, insipired from FreeBSD.
> For memory locking I have used uvm_map_pageable(), but I am not sure is
> this OK. It needs testing. Please review the patch and comment it.

if they are supposed to lock backing store (ie. aobj) even when
there is no mappings, uvm_map_pageable is not appropriate.
what you need is something like getpages -> pagewire -> dropswap.