Re: [PATCH] udev enhancements to use kernel event queue

Greg KH
2003-06-19T00:07:05Z

On Wed, Jun 18, 2003 at 05:12:50PM -0700, Kevin P. Fleming wrote:
> Greg KH wrote:
>
> >>If this kmalloc fails, you'll have a hole in the numbers and
> >>user space will be very confused. You need to report dropped
> >>events if you do this.
> >
> >
> >Yes, we should add the sequence number last.
> >
>
> While this is not a bad idea, I don't think you want to make a promise
> to userspace that there will never be gaps in the sequence numbers. When
> this sequence number was proposed, in my mind it seemed perfect because
> then userspace could _order_ multiple events for the same device to
> ensure they got processed in the correct order. I don't know that any
> hotplug userspace implementation is going to be large and complex enough
> to warrant "holding" events until lower-numbered events have been
> delivered. That just seems like a very difficult task with little
> potential gain, but I could very well be mistaken :-)

Yes you are :)

You will have to handle gaps properly yes.

But you also have to "hold" events for a bit of time in order to
determine that things are out of order, or we have a gap. So a bit of
"complex" logic is in the works, but it's much less complex than if we
didn't have that sequence number.

thanks,

greg k-h