Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 01 Jun 2011 09:07:38 +0300
From:      Andriy Gapon <avg@FreeBSD.org>
To:        "Kenneth D. Merry" <ken@FreeBSD.org>
Cc:        svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: svn commit: r222537 - in head/sys: kern sys
Message-ID:  <4DE5D72A.1020405@FreeBSD.org>
In-Reply-To: <201105311729.p4VHTwrZ033296@svn.freebsd.org>
References:  <201105311729.p4VHTwrZ033296@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
on 31/05/2011 20:29 Kenneth D. Merry said the following:
> +	mtx_init(&mbp->msg_lock, "msgbuf", NULL, MTX_SPIN);


Sorry that I didn't gather myself together for a review before this change got
actually committed.
Do you see any reason not to make this spinlock recursive?

I am a little bit worried about "exotic" situations like receiving an NMI in the
middle of printing and wanting to print in the NMI context, or similar things
that penetrate contexts with disabled interrupts - e.g. Machine Check Exception.
Also it's not clear to me if there won't any bigger damage in the situations
like those described above.

P.S. I have been thinking about fixing the problem in a different fashion, via
reserving portions of dmesg buffer for a whole message using CAS:
http://lists.freebsd.org/pipermail/freebsd-hackers/2010-April/031535.html

-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4DE5D72A.1020405>