From owner-freebsd-arch@FreeBSD.ORG Mon Mar 6 19:39:13 2006 Return-Path: X-Original-To: arch@freebsd.org 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 DA57D16A420; Mon, 6 Mar 2006 19:39:13 +0000 (GMT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id A025B43D48; Mon, 6 Mar 2006 19:39:13 +0000 (GMT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.13.4/8.13.4) with ESMTP id k26JdCFr065221; Mon, 6 Mar 2006 11:39:13 -0800 (PST) Received: (from dillon@localhost) by apollo.backplane.com (8.13.4/8.13.4/Submit) id k26JdCj8065218; Mon, 6 Mar 2006 11:39:12 -0800 (PST) Date: Mon, 6 Mar 2006 11:39:12 -0800 (PST) From: Matthew Dillon Message-Id: <200603061939.k26JdCj8065218@apollo.backplane.com> To: John Baldwin References: <200603061353.13756.jhb@freebsd.org> Cc: dima <_pppp@mail.ru>, arch@freebsd.org, Poul-Henning Kamp , Robert Watson , freebsd-arch@freebsd.org Subject: Re: wakeup idea... X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Mar 2006 19:39:14 -0000 I've tried many variations of the idea of passing a real structure to sleep/wakeup and eventually gave up on trying to change the API. It is just too useful to be able to pass an arbitrary 'id' as a the rendezvous point. But, what I *did* do was implement scheduling primitives that sleep/wakeup uses to do the actual descheduling and rescheduling of the kernel thread, and there are a number of mechanisms in DragonFly which use those primitives directly rather then using sleep/wakeup. In particular, the interrupt thread procedure, softclock thread, and DragonFly's LWKT messaging subsystem (e.g. lwkt_default_waitport()). So what I would recommend is that the sleep/wakeup API *NOT* be changed, but instead you simplify the lower level APIs that sleep/wakeup uses to the point where other high performance APIs in the system, such as lockmgr, can call them directly without making a mess. -Matt