From 2842570c5ff107e551e8ec88def0b774d8dfc3d1 Mon Sep 17 00:00:00 2001 From: Derek Bruening Date: Thu, 6 Jun 2024 12:33:34 -0400 Subject: [PATCH] Update drmemtrace scheduler switch thresholds (#6840) Changes the drmemtrace scheduler's default context switch threshold parameters, which trigger on system call latencies, to more closely match observed patterns in large applications. + Raises the non-blocking threshold to a very high level as we do not expect many such switchs, if any, in most applications. + Raises the blocking threshold from 100us to 500us to match switch rates seen in real applications. Tested on large internal traces where the switch rate was compared to untraced values. --- clients/drcachesim/common/options.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/clients/drcachesim/common/options.cpp b/clients/drcachesim/common/options.cpp index 0466f622b8e..e6d5f16c7b6 100644 --- a/clients/drcachesim/common/options.cpp +++ b/clients/drcachesim/common/options.cpp @@ -855,13 +855,14 @@ droption_t op_sched_order_time(DROPTION_SCOPE_ALL, "sched_order_time", tru "Whether to honor recorded timestamps for ordering"); droption_t op_sched_syscall_switch_us( - DROPTION_SCOPE_ALL, "sched_syscall_switch_us", 500, - "Minimum latency to consider any syscall as incurring a context switch.", - "Minimum latency in timestamp units (us) to consider any syscall as incurring " - "a context switch. Applies to -core_sharded and -core_serial. "); + DROPTION_SCOPE_ALL, "sched_syscall_switch_us", 30000000, + "Minimum latency to consider a non-blocking syscall as incurring a context switch.", + "Minimum latency in timestamp units (us) to consider a non-blocking syscall as " + "incurring a context switch (see -sched_blocking_switch_us for maybe-blocking " + "syscalls). Applies to -core_sharded and -core_serial. "); droption_t op_sched_blocking_switch_us( - DROPTION_SCOPE_ALL, "sched_blocking_switch_us", 100, + DROPTION_SCOPE_ALL, "sched_blocking_switch_us", 500, "Minimum latency to consider a maybe-blocking syscall as incurring a context switch.", "Minimum latency in timestamp units (us) to consider any syscall that is marked as " "maybe-blocking to incur a context switch. Applies to -core_sharded and "