From d05b7a1c363c30c7fcd9d163f457c1ed80d28f19 Mon Sep 17 00:00:00 2001 From: David Smith Date: Fri, 12 Jun 2009 13:20:57 -0500 Subject: Fixed non-bulkmode output on smp systems using transport version 2. * runtime/transport/relay_v2.c (__stp_relay_create_buf_file_callback): Set the 'is_global' return parameter so that smp systems work correctly. --- runtime/transport/relay_v2.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'runtime') diff --git a/runtime/transport/relay_v2.c b/runtime/transport/relay_v2.c index 16b5afa1..246c4965 100644 --- a/runtime/transport/relay_v2.c +++ b/runtime/transport/relay_v2.c @@ -204,6 +204,21 @@ __stp_relay_create_buf_file_callback(const char *filename, { struct dentry *file = debugfs_create_file(filename, mode, parent, buf, &relay_file_operations); + /* + * Here's what 'is_global' does (from linux/relay.h): + * + * Setting the is_global outparam to a non-zero value will + * cause relay_open() to create a single global buffer rather + * than the default set of per-cpu buffers. + */ + if (is_global) { +#ifdef STP_BULKMODE + *is_global = 0; +#else + *is_global = 1; +#endif + } + if (IS_ERR(file)) { file = NULL; } -- cgit