Try ThreadSafeQueue at the converge point, which as Bobby points out should be correct even when multithreaded, but doesn't require locks. However, it will still be slowish, as would be anything that tried to enforce strict order, since the queue pointers will bounce among cores.
Eddie On 2/23/11 9:36 PM, Philip Prindeville wrote: > I was wondering... if I'm running multiple duplicate paths each on its own > core and I eventually need to collect them up so I can resequence packets and > pass them up into user-space... how feasible is it to go from threaded and > lockless to converging into a single locked queue (fan-in)? > > I figure it would be the best of both worlds because most of the operations > could happen threaded and without locking, and the locking only needs to be > enforced in the final stage... > > Thanks. > > -Philip > > _______________________________________________ > click mailing list > [email protected] > https://amsterdam.lcs.mit.edu/mailman/listinfo/click _______________________________________________ click mailing list [email protected] https://amsterdam.lcs.mit.edu/mailman/listinfo/click
