From 2170c64ba1c7cee280da29fb6351d8f7e6b736da Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 2 Jul 2010 09:34:30 -0700 Subject: [PATCH] msgr: add config option to set stacksize of reader&writer threads Signed-off-by: Sage Weil --- src/config.cc | 1 + src/config.h | 1 + src/msg/SimpleMessenger.h | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/config.cc b/src/config.cc index 3183bfd35b1fb..bca6c15898874 100644 --- a/src/config.cc +++ b/src/config.cc @@ -315,6 +315,7 @@ static struct config_option config_optionsp[] = { OPTION(ms_die_on_bad_msg, 0, OPT_BOOL, false), OPTION(ms_dispatch_throttle_bytes, 0, OPT_INT, 100 << 20), OPTION(ms_bind_ipv6, 0, OPT_BOOL, false), + OPTION(ms_rwthread_stack_bytes, 0, OPT_INT, 1024 << 10), OPTION(mon_data, 0, OPT_STR, ""), OPTION(mon_tick_interval, 0, OPT_INT, 5), OPTION(mon_subscribe_interval, 0, OPT_DOUBLE, 300), diff --git a/src/config.h b/src/config.h index ced46d0b533ae..80efab565f7c5 100644 --- a/src/config.h +++ b/src/config.h @@ -141,6 +141,7 @@ struct md_config_t { bool ms_die_on_bad_msg; uint64_t ms_dispatch_throttle_bytes; bool ms_bind_ipv6; + uint64_t ms_rwthread_stack_bytes; // mon const char *mon_data; diff --git a/src/msg/SimpleMessenger.h b/src/msg/SimpleMessenger.h index 1a75a98cf8e18..75d0b5a98b4ed 100644 --- a/src/msg/SimpleMessenger.h +++ b/src/msg/SimpleMessenger.h @@ -212,13 +212,13 @@ private: assert(pipe_lock.is_locked()); assert(!reader_running); reader_running = true; - reader_thread.create(); + reader_thread.create(g_conf.ms_rwthread_stack_bytes); } void start_writer() { assert(pipe_lock.is_locked()); assert(!writer_running); writer_running = true; - writer_thread.create(); + writer_thread.create(g_conf.ms_rwthread_stack_bytes); } void join_reader() { if (!reader_running) -- 2.39.5