]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
uipc_shm: Implements fspacectl(2) support
authorKa Ho Ng <khng@FreeBSD.org>
Thu, 12 Aug 2021 15:01:02 +0000 (23:01 +0800)
committerKa Ho Ng <khng@FreeBSD.org>
Thu, 12 Aug 2021 15:04:18 +0000 (23:04 +0800)
commit454bc887f250ce0bceaabd0ec624d077269d3220
tree0f485c524f79b35918269e89a2d7f59d46374112
parenta638dc4ebc8eaa90a87ee053b7104ee4511f4491
uipc_shm: Implements fspacectl(2) support

This implements fspacectl(2) support on shared memory objects. The
semantic of SPACECTL_DEALLOC is equivalent to clearing the backing
store and free the pages within the affected range. If the call
succeeds, subsequent reads on the affected range return all zero.

tests/sys/posixshm/posixshm_tests.c is expanded to include a
fspacectl(2) functional test.

Sponsored by: The FreeBSD Foundation
Reviewed by: kevans, kib
Differential Revision: https://reviews.freebsd.org/D31490
sys/kern/uipc_shm.c
tests/sys/posixshm/posixshm_test.c