From owner-freebsd-arch@FreeBSD.ORG Mon Oct 25 17:14:48 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 033CA16A4CE for ; Mon, 25 Oct 2004 17:14:48 +0000 (GMT) Received: from mail2.speakeasy.net (mail2.speakeasy.net [216.254.0.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id CBF1243D1F for ; Mon, 25 Oct 2004 17:14:47 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: (qmail 3064 invoked from network); 25 Oct 2004 17:14:47 -0000 Received: from gate.funkthat.com (HELO hydrogen.funkthat.com) ([69.17.45.168]) (envelope-sender ) by mail2.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 25 Oct 2004 17:14:47 -0000 Received: from hydrogen.funkthat.com (atmzeb@localhost.funkthat.com [127.0.0.1])i9PHEklb069894; Mon, 25 Oct 2004 10:14:46 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.10/8.12.10/Submit) id i9PHEj6a069893; Mon, 25 Oct 2004 10:14:45 -0700 (PDT) Date: Mon, 25 Oct 2004 10:14:45 -0700 From: John-Mark Gurney To: Sam Message-ID: <20041025171445.GE22681@funkthat.com> Mail-Followup-To: Sam , Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= , freebsd-current@freebsd.org, freebsd-arch@freebsd.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.2-RELEASE 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: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= cc: freebsd-current@freebsd.org cc: freebsd-arch@freebsd.org Subject: Re: 6.0 Witness squawk X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Oct 2004 17:14:48 -0000 Sam wrote this message on Mon, Oct 25, 2004 at 12:22 -0500: > >Sam writes: > >>There are three entry points into the driver. 1) The disk > >>layer 2) the netisr routine 3) the rexmit timer. > > > >AFAIK, if the code that calls malloc() can be reached from 2) or 3), > >you're not allowed to use M_WAITOK. > > Hm. If that's true then I've either got to petition you > fellas to change disk_alloc(), disk_create(), and disk_destroy() > to use M_NOWAIT or schedule a callback where these calls > can be handled properly. > > Thoughts about either approach? I'd go and do a callback.. You can do that using the generic taskqueue setup for this task... It's not an event that happens often, so the delay to schedule and execute won't be significant... Changing disk_alloc and friends to use M_NOWAIT would have significant implications to other code... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."