Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#8568 closed enhancement (implemented)

use TOR_SIMPLEQ for cell_queue_t

Reported by: nickm Owned by:
Priority: Low Milestone: Tor: 0.2.5.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: tor-relay refactoring
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


It's silly to have our own, less-efficient implementation of a singly-linked queue. We can save a couple of CPU cycles, and some mental energy, by switching to TOR_SIMPLEQ.

We should update this to know about destroy cell queues, once #7912 is merged.

Child Tickets

Change History (4)

comment:1 Changed 5 years ago by nickm

Status: newneeds_review

Implementation in branch "simpleq_for_cells"

comment:2 Changed 5 years ago by asn

Looks reasonable. I think the sizeof in cell_queue_init() might be pointing to a pointer, instead of the cell_queue_t struct itself.

comment:3 Changed 5 years ago by nickm

Resolution: implemented
Status: needs_reviewclosed

Thanks; I've fixed it up and added some tests in "simpleq_for_cells_2", and squashed and rebased in "simpleq_for_cells_3". Now merging.

comment:4 Changed 5 years ago by arma

See #9296 for a possibly related new seg fault.

Note: See TracTickets for help on using tickets.