{
        int n;
        va_list args;
-       static char bt_msg_buf[BLK_TN_MAX_MSG];
+       char *buf;
 
+       preempt_disable();
+       buf = per_cpu_ptr(bt->msg_data, smp_processor_id());
        va_start(args, fmt);
-       n = vscnprintf(bt_msg_buf, BLK_TN_MAX_MSG, fmt, args);
+       n = vscnprintf(buf, BLK_TN_MAX_MSG, fmt, args);
        va_end(args);
 
-       trace_note(bt, 0, BLK_TN_MESSAGE, bt_msg_buf, n);
+       trace_note(bt, 0, BLK_TN_MESSAGE, buf, n);
+       preempt_enable();
 }
 EXPORT_SYMBOL_GPL(__trace_note_message);
 
        debugfs_remove(bt->dropped_file);
        blk_remove_tree(bt->dir);
        free_percpu(bt->sequence);
+       free_percpu(bt->msg_data);
        kfree(bt);
 }
 
        if (!bt->sequence)
                goto err;
 
+       bt->msg_data = __alloc_percpu(BLK_TN_MAX_MSG);
+       if (!bt->msg_data)
+               goto err;
+
        ret = -ENOENT;
        dir = blk_create_tree(buts->name);
        if (!dir)
                if (bt->dropped_file)
                        debugfs_remove(bt->dropped_file);
                free_percpu(bt->sequence);
+               free_percpu(bt->msg_data);
                if (bt->rchan)
                        relay_close(bt->rchan);
                kfree(bt);
 
        int trace_state;
        struct rchan *rchan;
        unsigned long *sequence;
+       unsigned char *msg_data;
        u16 act_mask;
        u64 start_lba;
        u64 end_lba;
                if (unlikely(bt))                                       \
                        __trace_note_message(bt, fmt, ##__VA_ARGS__);   \
        } while (0)
-#define BLK_TN_MAX_MSG         1024
+#define BLK_TN_MAX_MSG         128
 
 /**
  * blk_add_trace_rq - Add a trace for a request oriented action