From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Friesen Date: Thu, 05 Feb 2004 06:53:12 +0000 Subject: Re: [PATCH] convert udevsend/udevd to using datagram sockets Message-Id: <4021E858.7010206@sympatico.ca> List-Id: References: <40209893.8080109@sympatico.ca> In-Reply-To: <40209893.8080109@sympatico.ca> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org Kay Sievers wrote: > You are talking about complexity, but what is about speed? >=20 > blocking daemon: time for i in `seq 1 100`; do SEQNUM=3D$i ACTION=ADd=20 > DEVPATH=3D$i ./udevsend x; done real 0m1.175s user 0m0.054s sys=20 > 0m0.081s >=20 > threading daemon: time for i in `seq 1 100`; do SEQNUM=3D$i ACTION=ADd=20 > DEVPATH=3D$i ./udevsend x; done real 0m0.048s user 0m0.018s sys=20 > 0m0.029s >=20 > I don't see what we get with the blocking I/O. It seems more like=20 > personal taste than numbers. :) Interesting numbers. I instrumented the code in udevd using the x86 tsc and got the following amounts of time to receive and queue all the requests: blocking recv() and datagrams: .13-.18 ms threaded and streams: .05-.18 ms I'm curious why my blocking recv() times are roughly on par with the threaded numbers, while yours are much worse. When I time how long it takes until all the requests are satisfied (i.e. run_threads() has run 100 times), its 4-4.8 seconds either way--it doesn't seem to matter. Looks like this is due to the size of EVENT_TIMEOUT_SEC more than anything else. Note that these numbers are with a 1.6GHz Athlon XP, 2.6.1 kernel, and linuxthreads rather than NPTL. (I know, I need to get NTPL going....) I'm playing with a single-threaded version. I'll let you know if it=20 amounts to anything. Chris ------------------------------------------------------- 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