logger: allow pressure disabling for testing only

This commit is contained in:
Thomas Schoebel-Theuer 2019-06-25 08:06:35 +02:00
parent c922bafa52
commit d7d03981c2
3 changed files with 8 additions and 0 deletions

View File

@ -97,6 +97,7 @@ int trans_logger_do_crc =
int trans_logger_mem_usage; // in KB
int trans_logger_pressure_limit = 0;
int trans_logger_disable_pressure = 0; /* only for testing */
int trans_logger_report_interval = 2; /* seconds */
@ -2387,6 +2388,11 @@ int _do_ranking(struct trans_logger_brick *brick)
MARS_IO("local_mem_used = %d\n", local_mem_used);
}
/* disable pressure ONLY for testing */
if (trans_logger_disable_pressure > 0)
pressure_mode = 0;
else if (trans_logger_disable_pressure < 0)
pressure_mode = 1;
if (delay_callers) {
if (!brick->delay_callers) {
brick->delay_callers = true;

View File

@ -51,6 +51,7 @@ extern int trans_logger_completion_semantics;
extern int trans_logger_do_crc;
extern int trans_logger_mem_usage; // in KB
extern int trans_logger_pressure_limit;
extern int trans_logger_disable_pressure; /* only for testing */
extern int trans_logger_report_interval;
extern int trans_logger_writeback_maxage;
extern int trans_logger_max_interleave;

View File

@ -343,6 +343,7 @@ struct ctl_table mars_table[] = {
INT_ENTRY("mapfree_period_sec", mapfree_period_sec, 0600),
INT_ENTRY("mapfree_grace_keep_mb", mapfree_grace_keep_mb, 0600),
INT_ENTRY("logger_pressure_limit", trans_logger_pressure_limit, 0600),
INT_ENTRY("logger_disable_pressure", trans_logger_disable_pressure, 0600),
INT_ENTRY("logger_writeback_maxage_s", trans_logger_writeback_maxage, 0600),
INT_ENTRY("logger_report_interval_s", trans_logger_report_interval, 0600),
INT_ENTRY("logger_max_interleave", trans_logger_max_interleave, 0600),