From owner-freebsd-current@FreeBSD.ORG Thu Sep 19 20:26:22 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5C9A9293; Thu, 19 Sep 2013 20:26:22 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 35FEF2785; Thu, 19 Sep 2013 20:26:22 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 410D1B96E; Thu, 19 Sep 2013 16:26:21 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org Subject: Re: ipmi patch for review Date: Thu, 19 Sep 2013 15:04:46 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <20130917102110.GK4574@glebius.int.ru> In-Reply-To: <20130917102110.GK4574@glebius.int.ru> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201309191504.46986.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 19 Sep 2013 16:26:21 -0400 (EDT) Cc: Gleb Smirnoff 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: Thu, 19 Sep 2013 20:26:22 -0000 On Tuesday, September 17, 2013 6:21:10 am Gleb Smirnoff wrote: > Hi! > > When system is writing a kernel core dump, it issues watchdog > pat wdog_kern_pat(WD_LASTVAL). If ipmi is in action, it registers > ipmi_wd_event() as event for watchdog. Thus ipmi_wd_event() is > called in dumping context. > > The problem is that ipmi_wd_event() calls into ipmi_set_watchdog(), > that calls into ipmi_alloc_request(), which uses M_WAITOK and > thus sleeps. This is a smaller problem, since can be converted to > M_NOWAIT. But ipmi_set_watchdog() then calls into > ipmi_submit_driver_request(), which calls msleep() any time. > > The attached patch allows me to successfully write cores in > presence of IPMI. Of course, the watchdog might go off during your dump. :) The real fix is more complicated, which is that we should not use a worker thread for at least SMIC and KCS. -- John Baldwin