[tor-dev] Parallel Crypto - Library dep.

David Goulet dgoulet at ev0ke.net
Tue Jan 31 19:46:02 UTC 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi everyone,

To help the tor project, I'll contribute some of my spare time to improve
multithreading for the Tor code base.

I've speak a bit with Nick M. and it seems the crypto lib is an important part
to begin with. The wiki page
(https://trac.torproject.org/projects/tor/wiki/org/projects/Tor/MultithreadedCrypto)
indicates, basically, that a worker thread pool with a work queue to dispatch
crypto events should be the right approach and I do agree.

Is it acceptable to link an external library to the project being a dependence?

The library I'm thinking about is "liburcu" which stands for user-space RCU
(http://lttng.org/urcu). It's a complete set of lockless data structure
including wait-free queue which can be very useful for our case. It support a
large variety of architecture and works on BSD and Linux. The Linux kernel use
RCU mechanism for a lot of internal data structure today so it's quite tested
and solid.

The question I think is do we want lockless data structure in Tor or it's not
and will not be necessary for the type of workload ? (lockless re-sizable hash
tables, red-black tree, stack, linked-list (double also) and queue are available
as of today).

Waiting on your feedback guys, either way, I'll begin implementing parallel
crypto largely based on the wiki page (really good ideas there).

Thanks a lot!
David
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBAgAGBQJPKET6AAoJEELoaioR9I02OO0H/2lxrvak2ItAdGsXHsyH2dgz
U3ePxZUg8Ix5UuZXA/LnP3T7/HBa47mtPMj3hwuz2Wnarf6FulumYA3A9jKsZyxQ
tf6azD+G7CbZjjYPbe8XYfOZC6+x58mF7SciM/maLoFQLzCvw7ruBBXu8j0Ghw5Q
hcm8RMIa4UyB0szSpMqkt615sYQBgy7hhEkNKqxnfdP4zIqUIK8mJqBING6r7qU+
EhnIT5VNzKG9FZPkYNzXOvzbtH0MegNfePsi6gDYlkjR7gekiT9wYH9n5tFTPQUu
4BwqaaHR/Wk+zfHaQOmz+KC3eefUqcd+XP82mcPTSUDj4mzG1Sio2ZHKX0IeJVw=
=r0da
-----END PGP SIGNATURE-----


More information about the tor-dev mailing list