Skip to content
Snippets Groups Projects
Commit a80c4adc authored by Rik van Riel's avatar Rik van Riel Committed by Al Viro
Browse files

ipc,namespace: make ipc namespace allocation wait for pending free


Currently the ipc namespace allocation will fail when there are
ipc_namespace structures pending to be freed. This results in the
simple test case below, as well as some real world workloads, to
get allocation failures even when the number of ipc namespaces in
actual use is way below the limit.

int main()
{
	int i;

	for (i = 0; i < 100000; i++) {
		if (unshare(CLONE_NEWIPC) < 0)
			error(EXIT_FAILURE, errno, "unshare");
	}
}

Make the allocation of an ipc_namespace wait for pending frees,
so it will succeed.

real	6m19.197s
user	0m0.041s
sys	0m1.019s

Signed-off-by: default avatarRik van Riel <riel@surriel.com>
Reported-by: default avatarChris Mason <clm@meta.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent b7bfaa76
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment