From owner-freebsd-current Wed Jan 17 11:21:53 2001 Delivered-To: freebsd-current@freebsd.org Received: from meow.osd.bsdi.com (meow.osd.bsdi.com [204.216.28.88]) by hub.freebsd.org (Postfix) with ESMTP id 51BD637B754; Wed, 17 Jan 2001 11:21:22 -0800 (PST) Received: from laptop.baldwin.cx (john@jhb-laptop.osd.bsdi.com [204.216.28.241]) by meow.osd.bsdi.com (8.11.1/8.9.3) with ESMTP id f0HJJML38924; Wed, 17 Jan 2001 11:19:22 -0800 (PST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200101171907.f0HJ7Qe48680@earth.backplane.com> Date: Wed, 17 Jan 2001 11:21:15 -0800 (PST) From: John Baldwin To: Matt Dillon Subject: Re: HEADS-UP: await/asleep removal imminent Cc: current@FreeBSD.org, arch@FreeBSD.org, Soren Schmidt , Randell Jesup , Alfred Perlstein Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 17-Jan-01 Matt Dillon wrote: >:* Alfred Perlstein [010117 09:24] wrote: >:> >:> I'm not going to axe it for a few days, this is a really amazing >:> API that Matt added, the problem is utility and useage over code >:> complexity. >:> >:> It's just a proposal. >: >:I found several places where it may be useful, but I'm not sure if the >:benefits outweigh the gains. >:... >: >:The lock must be unwound becasue we're calling MGETHDR with M_TRYWAIT. >:If wae used M_TRY'A'WAIT the code would probably look something like >:this: > > The basic premis of using asleep()/await() is to allow you to > propogate a 'blocking condition' back up to a higher level rather > then blocking deep in side the kernel. Gotcha. Given that, if we switch to using condition variables for this, why not have the low level code return a pointer to a cv to wait on? This would do the same thing using an existing API (now) and I think would serve the same purposes as your API. Returning NULL for a cv would mean that no sleep was required. -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message