imports and python locking

Denys Duchier duchier at ps.uni-sb.de
Thu Jul 21 19:18:33 BST 2005


Martin Pool <mbp at sourcefrog.net> writes:

> The attached c file demonstrates the problem when compiled with "gcc
> -lpthread".  Compiling with -march=686 (in the hope of using cmpxchg or
> something) does not help.  Run it under strace and observe thousands of
> pointless futex calls.

all I see are FUTEX_WAKE operations. AIUI, there's no way around those as the
queue associated with a futex lives in the kernel.  What we don't see are
FUTEX_WAIT operations (all sem_wait are non-contended and take place only in
userspace).

Cheers,

-- 
Dr. Denys Duchier - IRI & LIFL - CNRS, Lille, France
+33 (0)6 25 78 25 74    http://www.lifl.fr/~duchier/




More information about the bazaar mailing list