diff options
author | Roger A. Faulkner <Roger.Faulkner@Sun.COM> | 2009-08-18 20:06:58 -0700 |
---|---|---|
committer | Roger A. Faulkner <Roger.Faulkner@Sun.COM> | 2009-08-18 20:06:58 -0700 |
commit | 7be238fce69ba74b2163fc0ea898dfdc01a4aa22 (patch) | |
tree | 7a78a0a39337b5ff0884b006e68b05c4135d7add /usr/src/uts/common/syscall/signotify.c | |
parent | 98e8d17584d08c481c8a827f2311c1e3e6aceabb (diff) | |
download | illumos-gate-7be238fce69ba74b2163fc0ea898dfdc01a4aa22.tar.gz |
6817506 Lock contention in kernel severely degrades clock-profiling on T5440 in SIGPROF handling
Diffstat (limited to 'usr/src/uts/common/syscall/signotify.c')
-rw-r--r-- | usr/src/uts/common/syscall/signotify.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/usr/src/uts/common/syscall/signotify.c b/usr/src/uts/common/syscall/signotify.c index d851abebba..bf5ed3b45e 100644 --- a/usr/src/uts/common/syscall/signotify.c +++ b/usr/src/uts/common/syscall/signotify.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -229,7 +229,6 @@ int sigresend(int sig, siginfo_t *siginfo, sigset_t *mask) { kthread_t *t = curthread; - proc_t *p = ttoproc(t); klwp_t *lwp = ttolwp(t); sigqueue_t *sqp = kmem_zalloc(sizeof (*sqp), KM_SLEEP); sigset_t set; @@ -261,9 +260,11 @@ sigresend(int sig, siginfo_t *siginfo, sigset_t *mask) } sigutok(&set, &kset); - mutex_enter(&p->p_lock); + /* + * We don't need to acquire p->p_lock here; + * we are manipulating thread-private data. + */ if (lwp->lwp_cursig || lwp->lwp_curinfo) { - mutex_exit(&p->p_lock); t->t_sig_check = 1; error = EAGAIN; goto bad; @@ -272,8 +273,6 @@ sigresend(int sig, siginfo_t *siginfo, sigset_t *mask) lwp->lwp_curinfo = sqp; schedctl_finish_sigblock(t); t->t_hold = kset; - mutex_exit(&p->p_lock); - t->t_sig_check = 1; return (0); bad: |