From: Jack Miller Date: Fri, 8 Aug 2014 21:23:21 +0000 (-0700) Subject: shm: allow exit_shm in parallel if only marking orphans X-Git-Tag: omap-for-v3.17/fixes-against-rc2~116^2~82 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83293c0f5a6130bf7d60b7b406f4a4de0cadd3d8;p=pandora-kernel.git shm: allow exit_shm in parallel if only marking orphans If shm_rmid_force (the default state) is not set then the shmids are only marked as orphaned and does not require any add, delete, or locking of the tree structure. Seperate the sysctl on and off case, and only obtain the read lock. The newly added list head can be deleted under the read lock because we are only called with current and will only change the semids allocated by this task and not manipulate the list. This commit assumes that up_read includes a sufficient memory barrier for the writes to be seen my others that later obtain a write lock. Signed-off-by: Milton Miller Signed-off-by: Jack Miller Cc: Davidlohr Bueso Cc: Manfred Spraul Cc: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed