Date: Tue, 14 Nov 2000 23:01:44 -0800 From: Mike Smith <msmith@freebsd.org> To: Garrett Wollman <wollman@khavrinen.lcs.mit.edu> Cc: John Baldwin <jhb@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/sys eventhandler.h Message-ID: <200011150701.eAF71iF01864@mass.osd.bsdi.com> In-Reply-To: Your message of "Tue, 14 Nov 2000 23:03:20 EST." <200011150403.XAA67532@khavrinen.lcs.mit.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
> <<On Tue, 14 Nov 2000 19:25:27 -0800, Mike Smith <msmith@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200011150701.eAF71iF01864>
