Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #9682

Closed (moved)
Open
Opened Sep 05, 2013 by Nick Mathewson@nickm🐙

Better work queue implementation for cpuworkers

Our current implementation for passing work to cpuworkers and getting answers from them is pretty bulletproof: we share an fd with each one, write our requests there as a serialized struct, and get our answers back as serialized struct. The cpuworker learns about new requests by calling read(); we learn about new answers from libevent().

But probably this isn't as efficient as it could be:

  • We should have a work queue implementation that doesn't require a cpuworker to wait for the main process to give it more data after each request it answers.
  • We should have a work queue implementation that uses condition variables as appropriate to notify cpuworkers of new data.
  • We should use appropriate libevent mechanisms notify the main thread of new answers. (There are a bunch of ways to implement a condition variable that wakes libevent; we should pick one.)
  • We should manage the communication in-memory rather than over sockets.
To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
Tor: 0.2.6.x-final
Milestone
Tor: 0.2.6.x-final
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#9682