From owner-cvs-src@FreeBSD.ORG Wed Nov 9 10:34:40 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6F9D916A41F; Wed, 9 Nov 2005 10:34:40 +0000 (GMT) (envelope-from nate@root.org) Received: from www.cryptography.com (li-22.members.linode.com [64.5.53.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1E57843D48; Wed, 9 Nov 2005 10:34:40 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.0.250] (ppp-71-139-0-107.dsl.snfc21.pacbell.net [71.139.0.107]) by www.cryptography.com (8.12.8/8.12.8) with ESMTP id jA9AYaDI018818 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 9 Nov 2005 02:34:38 -0800 Message-ID: <4371D0BB.9010608@root.org> Date: Wed, 09 Nov 2005 02:34:35 -0800 From: Nate Lawson User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Bruce Evans References: <200511090732.jA97W2ir099375@repoman.freebsd.org> <20051109204951.K68350@delplex.bde.org> In-Reply-To: <20051109204951.K68350@delplex.bde.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, Warner Losh , cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern subr_power.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Nov 2005 10:34:40 -0000 Bruce Evans wrote: > On Wed, 9 Nov 2005, Warner Losh wrote: > >> Modified files: >> sys/kern subr_power.c >> Log: >> Kick off the suspend sequence from the keyboard in a SWI rather than >> in the hardware interrupt context (even if it is likely just an >> ithread). We don't document that suspend/resume routines are run from >> such a context and some of the things that happen in those routines >> aren't interrupt safe. Since there's no real need to run from that >> context, this restores assumptions that suspend routines have made. >> >> This fixes Thierry Herbelot's 'Trying to sleep while sleeping is >> prohibited' problem. > > > Er, SWIs are interrupts too. Trying to sleep in a SWI handler should > cause the same message. This commit uses the general taskqueue SWI > handler. taskqueue(9) implicitly says that only the taskqueue thread > handler can sleep (it gives malloc(M_WAITOK) as an example of something > that can only be done in thread context). I agree. You should use a generic thread taskqueue. -- Nate