diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-13 16:00:36 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-13 16:00:36 -0500 |
| commit | 78a45c6f067824cf5d0a9fedea7339ac2e28603c (patch) | |
| tree | b4f78c8b6b9059ddace0a18c11629b8d2045f793 /include/uapi/linux | |
| parent | f96fe225677b3efb74346ebd56fafe3997b02afa (diff) | |
| parent | 29d293b6007b91a4463f05bc8d0b26e0e65c5816 (diff) | |
Merge branch 'akpm' (second patch-bomb from Andrew)
Merge second patchbomb from Andrew Morton:
- the rest of MM
- misc fs fixes
- add execveat() syscall
- new ratelimit feature for fault-injection
- decompressor updates
- ipc/ updates
- fallocate feature creep
- fsnotify cleanups
- a few other misc things
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (99 commits)
cgroups: Documentation: fix trivial typos and wrong paragraph numberings
parisc: percpu: update comments referring to __get_cpu_var
percpu: update local_ops.txt to reflect this_cpu operations
percpu: remove __get_cpu_var and __raw_get_cpu_var macros
fsnotify: remove destroy_list from fsnotify_mark
fsnotify: unify inode and mount marks handling
fallocate: create FAN_MODIFY and IN_MODIFY events
mm/cma: make kmemleak ignore CMA regions
slub: fix cpuset check in get_any_partial
slab: fix cpuset check in fallback_alloc
shmdt: use i_size_read() instead of ->i_size
ipc/shm.c: fix overly aggressive shmdt() when calls span multiple segments
ipc/msg: increase MSGMNI, remove scaling
ipc/sem.c: increase SEMMSL, SEMMNI, SEMOPM
ipc/sem.c: change memory barrier in sem_lock() to smp_rmb()
lib/decompress.c: consistency of compress formats for kernel image
decompress_bunzip2: off by one in get_next_block()
usr/Kconfig: make initrd compression algorithm selection not expert
fault-inject: add ratelimit option
ratelimit: add initialization macro
...
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/msg.h | 28 | ||||
| -rw-r--r-- | include/uapi/linux/sem.h | 18 |
2 files changed, 35 insertions, 11 deletions
diff --git a/include/uapi/linux/msg.h b/include/uapi/linux/msg.h index a70375526578..f51c8001dbe5 100644 --- a/include/uapi/linux/msg.h +++ b/include/uapi/linux/msg.h | |||
| @@ -51,16 +51,28 @@ struct msginfo { | |||
| 51 | }; | 51 | }; |
| 52 | 52 | ||
| 53 | /* | 53 | /* |
| 54 | * Scaling factor to compute msgmni: | 54 | * MSGMNI, MSGMAX and MSGMNB are default values which can be |
| 55 | * the memory dedicated to msg queues (msgmni * msgmnb) should occupy | 55 | * modified by sysctl. |
| 56 | * at most 1/MSG_MEM_SCALE of the lowmem (see the formula in ipc/msg.c): | 56 | * |
| 57 | * up to 8MB : msgmni = 16 (MSGMNI) | 57 | * MSGMNI is the upper limit for the number of messages queues per |
| 58 | * 4 GB : msgmni = 8K | 58 | * namespace. |
| 59 | * more than 16 GB : msgmni = 32K (IPCMNI) | 59 | * It has been chosen to be as large possible without facilitating |
| 60 | * scenarios where userspace causes overflows when adjusting the limits via | ||
| 61 | * operations of the form retrieve current limit; add X; update limit". | ||
| 62 | * | ||
| 63 | * MSGMNB is the default size of a new message queue. Non-root tasks can | ||
| 64 | * decrease the size with msgctl(IPC_SET), root tasks | ||
| 65 | * (actually: CAP_SYS_RESOURCE) can both increase and decrease the queue | ||
| 66 | * size. The optimal value is application dependent. | ||
| 67 | * 16384 is used because it was always used (since 0.99.10) | ||
| 68 | * | ||
| 69 | * MAXMAX is the maximum size of an individual message, it's a global | ||
| 70 | * (per-namespace) limit that applies for all message queues. | ||
| 71 | * It's set to 1/2 of MSGMNB, to ensure that at least two messages fit into | ||
| 72 | * the queue. This is also an arbitrary choice (since 2.6.0). | ||
| 60 | */ | 73 | */ |
| 61 | #define MSG_MEM_SCALE 32 | ||
| 62 | 74 | ||
| 63 | #define MSGMNI 16 /* <= IPCMNI */ /* max # of msg queue identifiers */ | 75 | #define MSGMNI 32000 /* <= IPCMNI */ /* max # of msg queue identifiers */ |
| 64 | #define MSGMAX 8192 /* <= INT_MAX */ /* max size of message (bytes) */ | 76 | #define MSGMAX 8192 /* <= INT_MAX */ /* max size of message (bytes) */ |
| 65 | #define MSGMNB 16384 /* <= INT_MAX */ /* default max size of a message queue */ | 77 | #define MSGMNB 16384 /* <= INT_MAX */ /* default max size of a message queue */ |
| 66 | 78 | ||
diff --git a/include/uapi/linux/sem.h b/include/uapi/linux/sem.h index 541fce03b50c..dd73b908b2f3 100644 --- a/include/uapi/linux/sem.h +++ b/include/uapi/linux/sem.h | |||
| @@ -63,10 +63,22 @@ struct seminfo { | |||
| 63 | int semaem; | 63 | int semaem; |
| 64 | }; | 64 | }; |
| 65 | 65 | ||
| 66 | #define SEMMNI 128 /* <= IPCMNI max # of semaphore identifiers */ | 66 | /* |
| 67 | #define SEMMSL 250 /* <= 8 000 max num of semaphores per id */ | 67 | * SEMMNI, SEMMSL and SEMMNS are default values which can be |
| 68 | * modified by sysctl. | ||
| 69 | * The values has been chosen to be larger than necessary for any | ||
| 70 | * known configuration. | ||
| 71 | * | ||
| 72 | * SEMOPM should not be increased beyond 1000, otherwise there is the | ||
| 73 | * risk that semop()/semtimedop() fails due to kernel memory fragmentation when | ||
| 74 | * allocating the sop array. | ||
| 75 | */ | ||
| 76 | |||
| 77 | |||
| 78 | #define SEMMNI 32000 /* <= IPCMNI max # of semaphore identifiers */ | ||
| 79 | #define SEMMSL 32000 /* <= INT_MAX max num of semaphores per id */ | ||
| 68 | #define SEMMNS (SEMMNI*SEMMSL) /* <= INT_MAX max # of semaphores in system */ | 80 | #define SEMMNS (SEMMNI*SEMMSL) /* <= INT_MAX max # of semaphores in system */ |
| 69 | #define SEMOPM 32 /* <= 1 000 max num of ops per semop call */ | 81 | #define SEMOPM 500 /* <= 1 000 max num of ops per semop call */ |
| 70 | #define SEMVMX 32767 /* <= 32767 semaphore maximum value */ | 82 | #define SEMVMX 32767 /* <= 32767 semaphore maximum value */ |
| 71 | #define SEMAEM SEMVMX /* adjust on exit max value */ | 83 | #define SEMAEM SEMVMX /* adjust on exit max value */ |
| 72 | 84 | ||
