From owner-cvs-src@FreeBSD.ORG Wed Nov 9 13:56:05 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 ADCC916A420; Wed, 9 Nov 2005 13:56:05 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 67B4443D46; Wed, 9 Nov 2005 13:56:02 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (junior.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id jA9DtrFU077747; Wed, 9 Nov 2005 06:55:58 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <4371FFF1.7020902@samsco.org> Date: Wed, 09 Nov 2005 06:56:01 -0700 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8) Gecko/20050615 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=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on pooker.samsco.org 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 13:56:06 -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). > > Bruce You're right, but sleeping in SWI's has never been enforced. CAM relies on it, for better or worse, and until that's fixed it's pointless to start enforcing it. Scott