From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Fri, 29 May 2009 18:11:30 +0000 Subject: Re: [GIT] Experimental threaded udev Message-Id: List-Id: References: <4A1EA138.10400@tuffmail.co.uk> In-Reply-To: <4A1EA138.10400@tuffmail.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org On Fri, May 29, 2009 at 19:53, Alan Jenkins w= rote: > =C2=A0Maybe just recycling the event processes would bring > similar gains, with less of the risks of threads. Yeah, I thought that too, without having tested anything, it could be, that we just want to keep a pipe to the event process, and let the event process send a signal back to the main daemon, that it has handled the event, and it goes to sleep after that. The main daemon can recycle a sleeping event process and push a new event over the pipe to it. If no events are queued anymore, the main daemon just closes the pipe, and the event process will exit. With that model we might be able to reduce the number of fork()s significantly. And we would still have the process separation, it's robustness, and the lock-free behavior for malloc, cloexec and all these issues. Thanks, Kay