From: Kay Sievers Date: Sat, 05 Aug 2006 00:04:48 +0000 Subject: Re: [PATCH] Only lookup uid/gid when applying rules Message-Id: <1154736288.3540.26.camel@pim.off.vrfy.org> List-Id: References: <200608011135.25769.uberlord@gentoo.org> In-Reply-To: <200608011135.25769.uberlord@gentoo.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org On Sat, 2006-08-05 at 00:32 +0100, Roy Marples wrote: > On Tuesday 01 August 2006 13:35, you wrote: > > On Tue, 2006-08-01 at 11:35 +0100, Roy Marples wrote: > > > Attached is a patch that stops udev from doing a uid/gid lookup unles= s it > > > is actually going to use the rule. > > > > Nope, that doesn't really help, we want to to resolve the names once on > > udevd startup and not from every event process again and again. >=20 > OK, this patch again removes the uid/gid lookup when loading rules as it'= s the=20 > root cause of the problem. I also don't see a flag being of any benefit. Well, the real problem is that we block n=3D(number of GROUP+OWNER keys) ldap timeouts in glibc waiting for a network connection. This patch just moves the problem away from the daemon startup to all event processes which use OWNER/GROUP. Right, it may be faster to wait for n timeouts with n event processes in parallel, than to wait for n timeouts in a row with the daemon. But I don't think, this fixes the problem proper. > However, this patch stores the looked up uid/gid back in the rule for fut= ure=20 > event processes on the same rule. So, this should also make us more effic= ient=20 > by only looking up the uid/gid for each rule when it's need, but only onc= e=20 > per rule. I don't see where you write to the rules. And even when, you can't reach the rules from an event process. Your accessible memory image is just a clone() of the daemon, which will go away with exit(), so you will never store anything for other events from there. Currently - with or without this patch - on a LDAP configuration that does not return anything on bootup, we assign all OWNER/GROUP permissions to "root". This can't be fixed later in the boot cycle, so we have a serious problem anyway. The question is, if we really should assign it to "root", or maybe fall-back to the built-in /etc/{passwd,groups} parser?=20 Kay ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=DEVD= EV _______________________________________________ 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