Kay Sievers wrote: > On Thu, May 28, 2009 at 16:35, Alan Jenkins <alan-jenkins@xxxxxxxxxxxxxx> wrote: > >> Now available for your delight and/or horror. >> >> <http://github.com/sourcejedi/udev/commits/threading-v0.3> >> >> For now, I'm still treating this as a patch series. That is, I may >> publish future versions with a rewritten history. I'll preserve the old >> branches though. >> >> It turns out the MADV_DONTFORK hack I was so proud of is >> implementation-dependant, i.e. a dirty hack. However, I'm confident >> that glibc can and should be modified to do it for all programs. And it >> is so worth it. On my test machine, threading alone goes from 2s >> boot-time coldplug to 1.3-ish. MADV_DONTFORK takes it down to 0.7-ish. >> The hack is contained in the last patch, "when forking a program, only >> copy the stack of the _current_ thread". >> > > Is that a single or dual CPU box? > Single CPU - its my Celeron 630Mhz netbook. > With the threaded version, it's 0.18 (1.51 -> 1.33) seconds faster > here for a full coldplug run on a: > Intel(R) Core(TM)2 Duo CPU U9400 @ 1.40GHz. > > It might be that the threaded version will only behave that much > better on a single CPU machine? > > Thanks, > Kay > I'll have a look on my Core2Duo desktop. My netbook core is much slower than a C2D desktop, but it does require explanation. There are a couple of global locks. The selinux context is per-process, so that's locked. If you don't have full close-on-exec support, it has to fallback to locking. I haven't tested the full close-on-exec support yet. My memory says my desktop machine steams through coldplug in a fraction of a second, but I've not measured it recently. Thanks Alan -- To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html