svn commit: r275372 - head/sys/kern
Konstantin Belousov
kib at FreeBSD.org
Mon Dec 1 17:36:11 UTC 2014
Author: kib
Date: Mon Dec 1 17:36:10 2014
New Revision: 275372
URL: https://svnweb.freebsd.org/changeset/base/275372
Log:
Disable recursion for the process spinlock.
Tested by: pho
Discussed with: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 1 month
Modified:
head/sys/kern/kern_mutex.c
head/sys/kern/kern_proc.c
Modified: head/sys/kern/kern_mutex.c
==============================================================================
--- head/sys/kern/kern_mutex.c Mon Dec 1 16:10:44 2014 (r275371)
+++ head/sys/kern/kern_mutex.c Mon Dec 1 17:36:10 2014 (r275372)
@@ -968,7 +968,7 @@ mutex_init(void)
mtx_init(&blocked_lock, "blocked lock", NULL, MTX_SPIN);
blocked_lock.mtx_lock = 0xdeadc0de; /* Always blocked. */
mtx_init(&proc0.p_mtx, "process lock", NULL, MTX_DEF | MTX_DUPOK);
- mtx_init(&proc0.p_slock, "process slock", NULL, MTX_SPIN | MTX_RECURSE);
+ mtx_init(&proc0.p_slock, "process slock", NULL, MTX_SPIN);
mtx_init(&proc0.p_statmtx, "pstatl", NULL, MTX_SPIN);
mtx_init(&proc0.p_itimmtx, "pitiml", NULL, MTX_SPIN);
mtx_init(&proc0.p_profmtx, "pprofl", NULL, MTX_SPIN);
Modified: head/sys/kern/kern_proc.c
==============================================================================
--- head/sys/kern/kern_proc.c Mon Dec 1 16:10:44 2014 (r275371)
+++ head/sys/kern/kern_proc.c Mon Dec 1 17:36:10 2014 (r275372)
@@ -227,7 +227,7 @@ proc_init(void *mem, int size, int flags
p->p_sched = (struct p_sched *)&p[1];
bzero(&p->p_mtx, sizeof(struct mtx));
mtx_init(&p->p_mtx, "process lock", NULL, MTX_DEF | MTX_DUPOK);
- mtx_init(&p->p_slock, "process slock", NULL, MTX_SPIN | MTX_RECURSE);
+ mtx_init(&p->p_slock, "process slock", NULL, MTX_SPIN);
mtx_init(&p->p_statmtx, "pstatl", NULL, MTX_SPIN);
mtx_init(&p->p_itimmtx, "pitiml", NULL, MTX_SPIN);
mtx_init(&p->p_profmtx, "pprofl", NULL, MTX_SPIN);
More information about the svn-src-head
mailing list