From owner-freebsd-current@FreeBSD.ORG Fri Sep 20 15:27:43 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 D1B33D7; Fri, 20 Sep 2013 15:27:43 +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 AAB632E38; Fri, 20 Sep 2013 15:27:43 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id ADDE8B979; Fri, 20 Sep 2013 11:27:42 -0400 (EDT) From: John Baldwin To: Gleb Smirnoff Subject: Re: ipmi patch for review Date: Fri, 20 Sep 2013 10:02:53 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <20130917102110.GK4574@glebius.int.ru> <201309191504.46986.jhb@freebsd.org> <20130920054452.GB4574@glebius.int.ru> In-Reply-To: <20130920054452.GB4574@glebius.int.ru> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201309201002.53480.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 20 Sep 2013 11:27:42 -0400 (EDT) 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 15:27:43 -0000 On Friday, September 20, 2013 1:44:52 am Gleb Smirnoff wrote: > 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. Yes, I think a temporary workaround is fine for now. > 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. > -- John Baldwin