Commit b2c56eac authored by Matt Traudt's avatar Matt Traudt Committed by David Goulet
Browse files

sched: Remove vanilla sched options that will be going away



- massive change to src/tgest/test_options.c since the sched options
  were added all over the place in it
- removing the sched options caused some tests to pass/fail in new ways
  so I assumed current behavior is correct and made them pass again
   - ex: "ConnLimit must be greater" lines
   - ex: "Authoritative directory servers must" line
- remove test_options_validate__scheduler in prep for new sched tests
Signed-off-by: David Goulet's avatarDavid Goulet <dgoulet@torproject.org>
parent 91c7bebf
......@@ -486,9 +486,11 @@ static config_var_t option_vars_[] = {
V(ServerDNSSearchDomains, BOOL, "0"),
V(ServerDNSTestAddresses, CSV,
"www.google.com,www.mit.edu,www.yahoo.com,www.slashdot.org"),
V(SchedulerLowWaterMark__, MEMUNIT, "100 MB"),
V(SchedulerHighWaterMark__, MEMUNIT, "101 MB"),
V(SchedulerMaxFlushCells__, UINT, "1000"),
OBSOLETE("SchedulerLowWaterMark__"),
OBSOLETE("SchedulerHighWaterMark__"),
OBSOLETE("SchedulerMaxFlushCells__"),
V(KISTSchedRunInterval, MSEC_INTERVAL, "0 msec"),
V(KISTSockBufSizeFactor, DOUBLE, "1.0"),
V(ShutdownWaitLength, INTERVAL, "30 seconds"),
OBSOLETE("SocksListenAddress"),
V(SocksPolicy, LINELIST, NULL),
......@@ -1811,11 +1813,14 @@ options_act(const or_options_t *old_options)
return -1;
}
/* XXXFORTOR remove set_watermarks */
/* Set up scheduler thresholds */
scheduler_set_watermarks((uint32_t)options->SchedulerLowWaterMark__,
(uint32_t)options->SchedulerHighWaterMark__,
(options->SchedulerMaxFlushCells__ > 0) ?
options->SchedulerMaxFlushCells__ : 1000);
scheduler_set_watermarks(100 * 1024*1024 /* 100 MB */,
101 * 1024*1024 /* 101 MB */,
100);
/* XXXFORTOR enable notification to sched that the conf might have changed */
//scheduler_conf_changed();
/* Set up accounting */
if (accounting_parse_options(options, 0)<0) {
......@@ -3112,17 +3117,6 @@ options_validate(or_options_t *old_options, or_options_t *options,
routerset_union(options->ExcludeExitNodesUnion_,options->ExcludeNodes);
}
if (options->SchedulerLowWaterMark__ == 0 ||
options->SchedulerLowWaterMark__ > UINT32_MAX) {
log_warn(LD_GENERAL, "Bad SchedulerLowWaterMark__ option");
return -1;
} else if (options->SchedulerHighWaterMark__ <=
options->SchedulerLowWaterMark__ ||
options->SchedulerHighWaterMark__ > UINT32_MAX) {
log_warn(LD_GENERAL, "Bad SchedulerHighWaterMark option");
return -1;
}
if (options->NodeFamilies) {
options->NodeFamilySets = smartlist_new();
for (cl = options->NodeFamilies; cl; cl = cl->next) {
......
......@@ -4535,19 +4535,6 @@ typedef struct {
/** How long (seconds) do we keep a guard before picking a new one? */
int GuardLifetime;
/** Low-water mark for global scheduler - start sending when estimated
* queued size falls below this threshold.
*/
uint64_t SchedulerLowWaterMark__;
/** High-water mark for global scheduler - stop sending when estimated
* queued size exceeds this threshold.
*/
uint64_t SchedulerHighWaterMark__;
/** Flush size for global scheduler - flush this many cells at a time
* when sending.
*/
int SchedulerMaxFlushCells__;
/** Is this an exit node? This is a tristate, where "1" means "yes, and use
* the default exit policy if none is given" and "0" means "no; exit policy
* is 'reject *'" and "auto" (-1) means "same as 1, but warn the user."
......@@ -4620,6 +4607,15 @@ typedef struct {
/** Bool (default: 0). Tells Tor to never try to exec another program.
*/
int NoExec;
/** Have the KIST scheduler run every X milliseconds. If less than zero, do
* not use the KIST scheduler but use the old vanilla scheduler instead. If
* zero, do what the consensus says and fall back to using KIST as if this is
* set to "10 msec" if the consensus doesn't say anything. */
int64_t KISTSchedRunInterval;
/** A multiplier for the KIST per-socket limit calculation. */
double KISTSockBufSizeFactor;
} or_options_t;
/** Persistent state for an onion router, as saved to disk. */
......
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment