From owner-freebsd-arch@FreeBSD.ORG Fri Aug 26 19:25:04 2011 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8C73106566C; Fri, 26 Aug 2011 19:25:04 +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 D3B678FC08; Fri, 26 Aug 2011 19:25:03 +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 WAA26463; Fri, 26 Aug 2011 22:25:02 +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 1Qx21V-000HbO-Pp; Fri, 26 Aug 2011 22:25:01 +0300 Message-ID: <4E57F30C.4000400@FreeBSD.org> Date: Fri, 26 Aug 2011 22:25:00 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:6.0) Gecko/20110819 Thunderbird/6.0 MIME-Version: 1.0 To: freebsd-arch@FreeBSD.org References: <4E53986B.5000804@FreeBSD.org> <201108230911.09021.jhb@freebsd.org> <4E564F15.3010809@FreeBSD.org> <201108250945.24606.jhb@freebsd.org> <4E57E5D8.3010606@FreeBSD.org> In-Reply-To: <4E57E5D8.3010606@FreeBSD.org> X-Enigmail-Version: undefined Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Hans Petter Selasky , John Baldwin Subject: Re: skipping locks, mutex_owned, usb X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Aug 2011 19:25:05 -0000 on 26/08/2011 21:28 Andriy Gapon said the following: [snip] > Another observation is that when the kernel code calls into syscons code > (kern_cons.c) it doesn't acquire the Giant. It seems that the kernel calls > syscons input routines only in some very special situations like very early boot > (pause after each line option), late shutdown stage ("press any key to...") and > ddb command prompt. [snip] > Hmm, but it's actually the kbd poll(TRUE) call itself that can be racy-ish... As I was going to argue with myself that there actually should not be any race here, because interrupts should already be disabled in the special cases, I suddenly realized that I forgot about yet another special case, which is actually not special enough - the mountroot prompt. And I think that this is the case which is the most troublesome comparing to all other cases. -- Andriy Gapon