diff options
author | Manfred Spraul <[email protected]> | 2013-09-30 13:45:06 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2013-09-30 14:31:01 -0700 |
commit | 6d07b68ce16ae9535955ba2059dedba5309c3ca1 (patch) | |
tree | f8eccb1e9ff34ffb41225d247329d7e73148b6fe /tools/perf/util/trace-event-scripting.c | |
parent | 5e9d527591421ccdb16acb8c23662231135d8686 (diff) |
ipc/sem.c: optimize sem_lock()
Operations that need access to the whole array must guarantee that there
are no simple operations ongoing. Right now this is achieved by
spin_unlock_wait(sem->lock) on all semaphores.
If complex_count is nonzero, then this spin_unlock_wait() is not
necessary, because it was already performed in the past by the thread
that increased complex_count and even though sem_perm.lock was dropped
inbetween, no simple operation could have started, because simple
operations cannot start when complex_count is non-zero.
Signed-off-by: Manfred Spraul <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Rik van Riel <[email protected]>
Reviewed-by: Davidlohr Bueso <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions