From owner-svn-src-all@FreeBSD.ORG Wed Jun 1 06:07:42 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC8DC106566B; Wed, 1 Jun 2011 06:07:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 7EECE8FC1B; Wed, 1 Jun 2011 06:07:41 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id JAA26970; Wed, 01 Jun 2011 09:07:40 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1QReah-000KC4-Ov; Wed, 01 Jun 2011 09:07:39 +0300 Message-ID: <4DE5D72A.1020405@FreeBSD.org> Date: Wed, 01 Jun 2011 09:07:38 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110503 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: "Kenneth D. Merry" References: <201105311729.p4VHTwrZ033296@svn.freebsd.org> In-Reply-To: <201105311729.p4VHTwrZ033296@svn.freebsd.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jun 2011 06:07:43 -0000 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