[tor-dev] Parallel Crypto - Library dep.
nickm at alum.mit.edu
Tue Jan 31 20:42:36 UTC 2012
On Tue, Jan 31, 2012 at 2:46 PM, David Goulet <dgoulet at ev0ke.net> wrote:
> -----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
> 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?
It depends, I'd say. Most of the data structures we're talking about
here are ones that allow a lockless and locked implementations. So my
ideal implementation would be to have the ability to use lockless
structures where available, but a locked implementation otherwise.
This would let us work with better lockless libraries if they come
along, and continue to run on operating systems or on CPUs that don't
support librcu, and also migrate to another system in the future in
case a better one comes along.
But personally, I would be very surprised if this turned out to make a
very big difference: even symmetric crypto is pretty slow in
comparison to even the most obvious work-queue implementations, right?
(If I'm missing something there, please let me know.)
More information about the tor-dev