Opened 7 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: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-sched, 034-triage-20180328, 034-removed-20180328
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

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

TicketStatusOwnerSummaryComponent
#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 (5)

comment:2 Changed 4 months 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.

comment:3 Changed 8 weeks ago by nickm

Keywords: 034-triage-20180328 added

comment:4 Changed 8 weeks ago by nickm

Keywords: 034-removed-20180328 added

Per our triage process, these tickets are pending removal from 0.3.4.

comment:5 Changed 6 weeks ago by nickm

Milestone: Tor: 0.3.4.x-finalTor: unspecified

These tickets, tagged with 034-removed-*, are no longer in-scope for 0.3.4. We can reconsider any of them, if time permits.

Note: See TracTickets for help on using tickets.