path: root/ipc/msg.c
diff options
authorDavidlohr Bueso <>2017-09-08 16:17:52 -0700
committerLinus Torvalds <>2017-09-08 18:26:51 -0700
commite4243b8062c13b8cb3d91695dc353cb9e6a0da25 (patch)
treed938e7b91914cef64560cdd0ad28ec510ae97e63 /ipc/msg.c
parent8419e64a0b734a1f98a07fc7c489495bebc6e33a (diff)
ipc/sem: play nicer with large nsops allocations
Replacing semop()'s kmalloc for kvmalloc was originally proposed by Manfred on the premise that it can be called for large (than order-1) sizes. For example, while Oracle recommends setting SEMOPM to a _minimum_ of 100, some distros[1] encourage the setting to be a factor of the amount of db tasks (PROCESSES), which can get fishy for large systems (easily going beyond 1000). [1] An Example of Semaphore Settings So let's just convert this to kvmalloc, just like the rest of the allocations we do in ipc. While the fallback vmalloc obviously involves more overhead, this by far the uncommon path, and it's better for the user than just erroring out with kmalloc. Link: Signed-off-by: Davidlohr Bueso <> Cc: Manfred Spraul <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'ipc/msg.c')
0 files changed, 0 insertions, 0 deletions