v2
2026-10-23
semop 参数数组计入 memcg · v2
SEMOPM 修复:超默认 nsops 才向 memcg 记账,拒绝负值并加锁校验,移除过时 UAPI 警告。
原始补丁链接
子 Patch(3)
1/3
ipc/sem: account enlarged sops arrays to memcg
Commit 6a4746ba0619 (“ipc: remove memcg accounting for sops objects in do_semtimedop()”) removed accounting based on the assumption that sops arrays would remain small, describing a maximum cost of tw
2/3
ipc/sem: reject negative SEMOPM values
The SEMOPM field has been stored as an int while semop() receives an unsigned operation count since the beginning of Git history. A negative SEMOPM accepted by proc_dointvec() is converted to a large
3/3
ipc/sem: remove obsolete SEMOPM fragmentation warning
The UAPI comment advises keeping SEMOPM at or below 1000 because a larger operation array may fail due to physical memory fragmentation. Commit e4243b8062c1 (“ipc/sem: play nicer with large nsops all