tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [PATCH] Re: sharing mutex between libc stub and libpthread



Emmanuel Dreyfus <manu%netbsd.org@localhost> wrote:

> Here is a third approach: if program is not linked with -lpthread, the
> libpthread implementation falls back to libc stubs:

Here is a complete and cleaned up patch:
http://ftp.espci.fr/shadow/manu/uselibcstub2.patch

I checked it still passes all libpthread tests, and it also passes the
new dlopen tests I posted earlier. On the performance front, I ran two
tests to evaluate the hit:

100 million free(malloc(1024)): slowdown 2%
without the patch: mean 27.36s, 106 samples, sd 0.48
with the patch: mean 28.04s, 245 samples, sd 0.25

100 million gmtime(&now): slowdown not significant
without the patch: 49,15s, 34 samples, sd 0.35
with the patch, 48.55s, 51 samples, sf 0.50


-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index