aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
authorOleg Nesterov <[email protected]>2009-09-23 22:56:46 +0000
committerLinus Torvalds <[email protected]>2009-09-24 14:20:59 +0000
commit0b7570e77f7c3abd43107dabc47ea89daf9a1cba (patch)
tree8dd93b4a189b4e98384d4470a289ecfb7818cc26 /security/selinux/hooks.c
parentdo_wait() wakeup optimization: shift security_task_wait() from eligible_child... (diff)
downloadkernel-0b7570e77f7c3abd43107dabc47ea89daf9a1cba.tar.gz
kernel-0b7570e77f7c3abd43107dabc47ea89daf9a1cba.zip
do_wait() wakeup optimization: change __wake_up_parent() to use filtered wakeup
Ratan Nalumasu reported that in a process with many threads doing unnecessary wakeups. Every waiting thread in the process wakes up to loop through the children and see that the only ones it cares about are still not ready. Now that we have struct wait_opts we can change do_wait/__wake_up_parent to use filtered wakeups. We can make child_wait_callback() more clever later, right now it only checks eligible_child(). Signed-off-by: Oleg Nesterov <[email protected]> Acked-by: Roland McGrath <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Ratan Nalumasu <[email protected]> Cc: Vitaly Mayatskikh <[email protected]> Acked-by: James Morris <[email protected]> Tested-by: Valdis Kletnieks <[email protected]> Acked-by: David Howells <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r--security/selinux/hooks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 417f7c994522..bb230d5d7085 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -2411,7 +2411,7 @@ static void selinux_bprm_committed_creds(struct linux_binprm *bprm)
/* Wake up the parent if it is waiting so that it can recheck
* wait permission to the new task SID. */
read_lock(&tasklist_lock);
- wake_up_interruptible(&current->real_parent->signal->wait_chldexit);
+ __wake_up_parent(current, current->real_parent);
read_unlock(&tasklist_lock);
}