From owner-cvs-all Tue Nov 14 22:55:35 2000 Delivered-To: cvs-all@freebsd.org Received: from mass.osd.bsdi.com (adsl-63-206-90-77.dsl.snfc21.pacbell.net [63.206.90.77]) by hub.freebsd.org (Postfix) with ESMTP id E8D3637B479; Tue, 14 Nov 2000 22:55:30 -0800 (PST) Received: from mass.osd.bsdi.com (localhost [127.0.0.1]) by mass.osd.bsdi.com (8.11.0/8.11.1) with ESMTP id eAF71iF01864; Tue, 14 Nov 2000 23:01:45 -0800 (PST) (envelope-from msmith@mass.osd.bsdi.com) Message-Id: <200011150701.eAF71iF01864@mass.osd.bsdi.com> X-Mailer: exmh version 2.1.1 10/15/1999 To: Garrett Wollman Cc: John Baldwin , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/sys eventhandler.h In-reply-to: Your message of "Tue, 14 Nov 2000 23:03:20 EST." <200011150403.XAA67532@khavrinen.lcs.mit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 14 Nov 2000 23:01:44 -0800 From: Mike Smith Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > < said: > > > If you want to release the lock on the list, you would have to detect > > when the list is changed and rescan it to find the 'new' current > > location. Only that doesn't work either, since the list traversal allows > > you to remove the current handler from the list. > > Not necessarily. You can do it by maintaining two queues, and > deferring deletion (using a flag bit in the queue element). I'm > fairly certain it's possible to do a completely non-blocking traversal > of such a queue. It's not so much the blocking that's an issue as that the list is dynamic and may change while you're in flight over it. My initial design goal with the eventhandlers was to keep them light and simple, since I didn't want yet another callout wheel. 8) However, I think it's become clear that we have reached a point where they need some more complexity in order to be usable, and it's at this point where my experience with these sorts of datastructures hits its limit. I'm not passionate about how these should or shouldn't be implemented; I just have a fair idea of what they need to be able to do. If someone else wants to take up the challenge and deal with the lock ordering issues that John has exposed, they're strongly encouraged to do so. I'll happily butt in if I think something's running off the rails, but I'm really out of ideas here. 8( -- ... every activity meets with opposition, everyone who acts has his rivals and unfortunately opponents also. But not because people want to be opponents, rather because the tasks and relationships force people to take different points of view. [Dr. Fritz Todt] V I C T O R Y N O T V E N G E A N C E To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message