From owner-cvs-src@FreeBSD.ORG Fri May 26 05:54:36 2006 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 484DF16A436; Fri, 26 May 2006 05:54:35 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id D4CFD43D46; Fri, 26 May 2006 05:54:34 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (0a4v0ub36r7cc9ay@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.4/8.13.3) with ESMTP id k4Q5sTJr040800; Thu, 25 May 2006 22:54:30 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.4/8.13.3/Submit) id k4Q5sOn8040799; Thu, 25 May 2006 22:54:24 -0700 (PDT) (envelope-from jmg) Date: Thu, 25 May 2006 22:54:24 -0700 From: John-Mark Gurney To: Warner Losh Message-ID: <20060526055424.GG49081@funkthat.com> References: <200605252306.k4PN6cCS081708@repoman.freebsd.org> <44766F75.9060100@samsco.org> <20060525.220611.74708877.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060525.220611.74708877.imp@bsdimp.com> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: cvs-src@freebsd.org, scottl@samsco.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/dev/syscons/apm apm_saver.c src/sys/i386/bios apm.c apm.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2006 05:54:36 -0000 Warner Losh wrote this message on Thu, May 25, 2006 at 22:06 -0600: > > In the past, I've been against mandating that callouts/timeouts/generic > > taskqueues should not be allowed to sleep. However, after looking over > > the history of this problem as well as others, it seems that it's just > > too easy for driver authors to make bad assumptions and wind up with a > > priority inversion/deadlock like this. It would be relatively trivial > > to mark these contexts as being non-sleepable and have the msleep code > > enforce it, like is done with ithreads. What do you think? Anyways, > > thanks for looking at this and fixing it. > > At the very least, we should mandate that timeouts are a non-sleepable > event. Sleeping just doesn't work there. taskqueues, I'm less sure > of, since short sleeps there work, but do degrade performance. I like > this idea. People worried about things like this should create their own thread for their taskqueue.. It's quite easy (simple macro declaration), and I did that for handling kq in kq... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."