Skip to content

Commit

Permalink
Disable forkproxy workaround by default
Browse files Browse the repository at this point in the history
We want the default mode to be that Shadow calculates the number
of processors to use based on the number of hosts specified in the
configuration file. (See shadow#1251.) In this case, we do not want to
run the forkproxy workaround, because the fact that waitpid is O(n)
won't matter when each processor only runs a few pids.

Closes shadow#1261
  • Loading branch information
robgjansen authored and sporksmith committed May 12, 2021
1 parent ff7be71 commit 7e9e991
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/3.1-Shadow-Config.md
Expand Up @@ -260,10 +260,10 @@ Use the MemoryManager. It can be useful to disable for debugging, but will hurt

#### `experimental.use_o_n_waitpid_workarounds`

Default: true
Default: false
Type: Bool

Enable performance workarounds for waitpid being O(n). Beneficial to disable if waitpid is patched to be O(1) or in some cases where it'd otherwise result in excessive detaching and reattaching.
Use performance workarounds for waitpid being O(n). Beneficial to disable if waitpid is patched to be O(1), if using one logical processor per host, or in some cases where it'd otherwise result in excessive detaching and reattaching.

#### `experimental.use_object_counters`

Expand Down
8 changes: 4 additions & 4 deletions src/main/core/support/configuration.rs
Expand Up @@ -194,9 +194,9 @@ pub struct ExperimentalOptions {
#[clap(about = EXP_HELP.get("use_sched_fifo").unwrap())]
use_sched_fifo: Option<bool>,

/// Enable performance workarounds for waitpid being O(n). Beneficial to disable if waitpid
/// is patched to be O(1) or in some cases where it'd otherwise result in excessive detaching
/// and reattaching
/// Use performance workarounds for waitpid being O(n). Beneficial to disable if waitpid
/// is patched to be O(1), if using one logical processor per host, or in some cases where
/// it'd otherwise result in excessive detaching and reattaching
#[clap(long, value_name = "bool")]
#[clap(about = EXP_HELP.get("use_o_n_waitpid_workarounds").unwrap())]
use_o_n_waitpid_workarounds: Option<bool>,
Expand Down Expand Up @@ -300,7 +300,7 @@ impl Default for ExperimentalOptions {
fn default() -> Self {
Self {
use_sched_fifo: Some(false),
use_o_n_waitpid_workarounds: Some(true),
use_o_n_waitpid_workarounds: Some(false),
use_explicit_block_message: Some(true),
use_syscall_counters: Some(false),
use_object_counters: Some(true),
Expand Down

0 comments on commit 7e9e991

Please sign in to comment.