From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Fri, 08 Oct 2004 21:05:20 +0000 Subject: Re: export of SEQNUM to userspace Message-Id: <20041008210520.GA28644@kroah.com> List-Id: References: <20040829203523.GA15526@vrfy.org> In-Reply-To: <20040829203523.GA15526@vrfy.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Fri, Oct 08, 2004 at 10:43:19AM -0400, David Zeuthen wrote: > > Hi, > > On Sun, 2004-08-29 at 22:35 +0200, Kay Sievers wrote: > > Hi Greg, > > we want to init HAL with the last emitted hotplug SEQNUM from the > > kernel. I think of a sysfs file we can read. It would solve the problem > > of the initial timeout, like we have with udevd too (the very first > > event is delayed). > > > > What is a proper place to live for this beast? > > > > Is this yet integrated? It's in the -mm tree, I'm waiting for 2.6.9 to come out before sending it for inclusion in the main kernel tree. > Another thing, I was thinking, for this to be really useful I guess what > we need is not (only?) the last emitted hotplug SEQNUM but instead the > "maximum SEQNUM ever emitted". Because with the "last SEQNUM emitted" > the kernel may emit this sequence of hotplug events > > 1004 > 1003 > 1002 <-- udevd starts; reads "last seqnum emitted is 1002" No, the read will read '1004', not 1002. > 1001 <-- udevd discards this hotplug event > 1005 <-- udevd blocks/timeouts waiting for 1002 > 1006 > 1007 > ... > > and we're as screwed as we are today. With "maximum SEQNUM ever emitted" > it will work; proof is by contradiction. The sysfs file will always show the "max SEQNUM" due to locking within the kernel keeping the order always correct. Hope this helps, greg k-h ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel