From owner-freebsd-current@FreeBSD.ORG Fri Sep 20 05:45:10 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 46156474; Fri, 20 Sep 2013 05:45:10 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C4C702F88; Fri, 20 Sep 2013 05:45:08 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id r8K5iqO8002799; Fri, 20 Sep 2013 09:44:52 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id r8K5iqse002798; Fri, 20 Sep 2013 09:44:52 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 20 Sep 2013 09:44:52 +0400 From: Gleb Smirnoff To: John Baldwin Subject: Re: ipmi patch for review Message-ID: <20130920054452.GB4574@glebius.int.ru> References: <20130917102110.GK4574@glebius.int.ru> <201309191504.46986.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201309191504.46986.jhb@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 05:45:10 -0000 John, On Thu, Sep 19, 2013 at 03:04:46PM -0400, John Baldwin wrote: J> > When system is writing a kernel core dump, it issues watchdog J> > pat wdog_kern_pat(WD_LASTVAL). If ipmi is in action, it registers J> > ipmi_wd_event() as event for watchdog. Thus ipmi_wd_event() is J> > called in dumping context. J> > J> > The problem is that ipmi_wd_event() calls into ipmi_set_watchdog(), J> > that calls into ipmi_alloc_request(), which uses M_WAITOK and J> > thus sleeps. This is a smaller problem, since can be converted to J> > M_NOWAIT. But ipmi_set_watchdog() then calls into J> > ipmi_submit_driver_request(), which calls msleep() any time. J> > J> > The attached patch allows me to successfully write cores in J> > presence of IPMI. J> J> Of course, the watchdog might go off during your dump. :) Yes, I understand that :( But, imho patch improves situation, although is ugly. J> The real fix is more complicated, which is that we should not use J> a worker thread for at least SMIC and KCS. -- Totus tuus, Glebius.