Opened 4 months ago

Last modified 6 weeks ago

#23993 assigned defect

sched: Refactor and fix interactions between channel and scheduler

Reported by: dgoulet Owned by: dgoulet
Priority: Medium Milestone: Tor: 0.3.4.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-sched
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


This is a top level ticket for all the things we need to address in the channel subsystem and scheduler.

Channels interact with the scheduler using a few entry points and assumptions provided by the circuit and channel subsystem. However, it turns out that the channel abstraction is often violated from the connection subsystem with channel_t and channeltls_t objects.

We also have too many cells queues that goes from connection inbuf to circuit queue to channel queue to connection outbuf. But #23709 showed us that the channel queues aren't quite working as intended.

Furthermore, we put scheduler state data in the channel_t object that are actually only relevant to the Vanilla scheduler but not to the other types (KIST and KISTLite for now).

Along with pastly, we've discussed changes to simplify the scheduler interface, to make scheduler data stored in a channel tied to a scheduler type and make some changes to improve the channel subsystem.

The child tickets address all of the above (and maybe more) in order to have a leaner channel subsystem that actually provides properties and correct assumptions to the scheduler.

Child Tickets

#23579accepteddgouletsched: Add accessors for channel_pending listCore Tor/Tor
#23709closeddgouletchannel: `outgoing_queue` and `incoming_queue` are always emptyCore Tor/Tor
#23710closeddgouletsched: channel_more_to_flush() is probably looking at the wrong queueCore Tor/Tor
#23711accepteddgouletsched: KIST writes to kernel and get a "wants to write" notification right afterCore Tor/Tor
#23712accepteddgouletsched: DESTROY cell on a circuit bypasses the schedulerCore Tor/Tor
#23744accepteddgouletsched: Notification events have different meaning for each schedulerCore Tor/Tor
#23751closeddgoulet[warn] tor_bug_occurred_: Bug: src/common/buffers.c, etc.Core Tor/Tor
#24448newChanneltls adds the connection write event to main loop when writing a packed cellCore Tor/Tor
#24449assigneddgouletsched: KIST scheduler should handle limited or failed connection writeCore Tor/Tor
#24554needs_revisiondgouletsched: Have per-scheduler type data in a channel_tCore Tor/Tor
#24700closeddgouletsched: With KIST, a channel can be added more than once in the pending listCore Tor/Tor

Change History (2)

comment:2 Changed 6 weeks ago by dgoulet

Milestone: Tor: 0.3.3.x-finalTor: 0.3.4.x-final

We won't be able to fix everything in 033.

Note: See TracTickets for help on using tickets.