From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Sat, 24 Jan 2004 01:21:08 +0000 Subject: Re: [PATCH] udev - next round of udev event order daemon Message-Id: <20040124012108.GA4701@vrfy.org> List-Id: References: <20040123151425.GA3813@vrfy.org> In-Reply-To: <20040123151425.GA3813@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, Jan 23, 2004 at 02:30:48PM -0800, Greg KH wrote: > On Fri, Jan 23, 2004 at 04:14:25PM +0100, Kay Sievers wrote: > > Here is the next round of udevd/udevsend: > > > > udevsend - If the IPC message we send is not catched by a receiver we fork > > the udevd daemon to process this and the following events > > Problem is we end up forking a lot of udevd instances if the system is > under load. That's not good :( > > I applied this patch, and then added some logic to udevd to only let one > instance of it run at a time. It isn't the nicest, but seems to work > for now... Maybe 190 millisec's are too short? Hmm, we may also look what pid received the last event and check if this pid is still running. So we prevent forking a new daemon just because of the timeout. > Hm, sometimes I still loose an event, I think it's back to the udevsend > creating too many udevd instances. Care to look at this? While we wait for the return of the udev exec, we don't get the messages out of the queue. That may cause the problem with the timeout. Do we need a receiver thread? Or fork udev in the background, but then a "remove" may be faster than a "add"? > Is using ipc calls too messy for this? Others have proposed sockets. > Would that make the startup logic simpler? Yes and no. We notice that we can't connect so there is a better indicator, that there is no daemon. But I think the main problem remains the same. I have less experience with this time critical stuff, so we may try it out, if nobody comes with a better idea? thanks, Kay ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ 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