diff options
author | Oleg Nesterov <oleg@tv-sign.ru> | 2006-12-06 20:36:50 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 08:39:34 -0800 |
commit | 128fb95650b3273a8dc9ba5514b6fe7db8ea30bf (patch) | |
tree | 82e8070451edbd7421b6176083658f5f2b997b58 /kernel/dma.c | |
parent | 38da288b8ba2b07b4e07165027e650b61d7c8ffc (diff) |
[PATCH] taskstats_exit_alloc: optimize/simplify
If there are no listeners, every task does unneeded kmem_cache alloc/free on
exit. We don't need listeners->sem for 'if (!list_empty())' check. Yes, we may
have a false positive, but this doesn't differ from the case when the listener
is unregistered after we drop the semaphore. So we don't need to do allocation
beforehand.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Balbir Singh <balbir@in.ibm.com>
Acked-by: Shailabh Nagar <nagar@watson.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/dma.c')
0 files changed, 0 insertions, 0 deletions