]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msgr: add config option to set stacksize of reader&writer threads
authorSage Weil <sage@newdream.net>
Fri, 2 Jul 2010 16:34:30 +0000 (09:34 -0700)
committerSage Weil <sage@newdream.net>
Fri, 2 Jul 2010 17:14:41 +0000 (10:14 -0700)
Signed-off-by: Sage Weil <sage@newdream.net>
src/config.cc
src/config.h
src/msg/SimpleMessenger.h

index 3183bfd35b1fb2873e1ebb4401f084febd46279a..bca6c15898874ec5a2728b8501f484f8507b0d46 100644 (file)
@@ -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),
index ced46d0b533ae2796ec92f2c16f401065620afe0..80efab565f7c5065b6202dc8ac26a16797545592 100644 (file)
@@ -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;
index 1a75a98cf8e1882f89d435a8e66906db34eaee60..75d0b5a98b4ed5b3bb2cd2889f351df8d912ac0a 100644 (file)
@@ -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)