Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ticket29698 043 01 #1494

Closed
wants to merge 7 commits into from
Closed

Conversation

Labels
None yet
Projects
None yet
3 participants
@dgoulet-tor
Copy link
Contributor

@dgoulet-tor dgoulet-tor commented Nov 4, 2019

No description provided.

dgoulet-tor added 6 commits Nov 4, 2019
This will allow us to update the cmux policy (in our case EWMA) so its
priority is updated just before we are about to run a scheduling round on a
pending channel.

Part of #29698

Signed-off-by: David Goulet <dgoulet@torproject.org>
Following previous commit, the EWMA touch function scales the active circuits
if need be.

Part of #29698

Signed-off-by: David Goulet <dgoulet@torproject.org>
Add a add channel function in order to do 3 things:

1. SCHED_BUG() on the channel state before anything.
2. Touch channel in order to update its policy if need be.
3. Set channel scheduling state to PENDING.
4. Add the channel to the pending list.

These steps were all duplicated in the code so make centralize it in one
static function.

Fixes #29698

Signed-off-by: David Goulet <dgoulet@torproject.org>
Because of the new EWMA touch function, the EWMA tick must be initialized. In
order to do that for each test we currently have and future ones we will
implement, this commit adds a setup and cleanup function for every tests in
test_scheduler.c in order to initialize the EWMA tick.

In order to do that, a bit of refactor is done to use a helper macro to setup
a test that always sets the testsetup_t object.

Finally, the loop_kist test is fixed to not reallocate the cmux because
new_fake_channel() does it in the first place and also sets the cmux policy
which we now need in ewma_touch().

Part of #29698

Signed-off-by: David Goulet <dgoulet@torproject.org>
Signed-off-by: David Goulet <dgoulet@torproject.org>
Signed-off-by: David Goulet <dgoulet@torproject.org>
@coveralls
Copy link

@coveralls coveralls commented Nov 4, 2019

Pull Request Test Coverage Report for Build 7050

  • 21 of 21 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 62.153%

Totals Coverage Status
Change from base Build 7047: 0.02%
Covered Lines: 48370
Relevant Lines: 77824

💛 - Coveralls

Signed-off-by: David Goulet <dgoulet@torproject.org>
@torproject-pusher torproject-pusher deleted the branch torproject:master May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment