Red Hat Bugzilla – Bug 831133
feature request: shm_rmid_forced
Last modified: 2012-07-10 11:51:01 EDT
Created attachment 591151 [details]
add shm_rmid_forced sysctl
This patch is a backport of shm_rmid_forced patch from upstream kernel.
"This patch adds support for shm_rmid_forced sysctl. If set to 1, all
shared memory objects in current ipc namespace will be automatically
forced to use IPC_RMID. POSIX way of handling shmem allows to create
shm objects and call shmdt() leaving shm object associated with no
process, thus consuming memory not counted via rlimits. With
shm_rmid_forced=1 the shared memory object is counted at least for one
process, so OOM killer may effectively kill the fat process holding
the shared memory.
It obviously breaks POSIX, some programs relying on the feature would
stop working. So, set shm_rmid_forced=1 only if you're sure nobody uses
"orphaned" memory. shm_rmid_forced=0 by default for compatability
The feature was previously impemented in -ow as a configure option."
The LKML discussion:
The merged patches:
b34a6b1da371ed8af1221459a18c67970f7e3d53 is already present in 6.3, not sure about the others.
This is a duplicate of bz 781600.
*** This bug has been marked as a duplicate of bug 781600 ***