aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/relay.h
diff options
context:
space:
mode:
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>2007-02-10 04:45:05 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 13:51:28 -0500
commit23c887522e912ca494950796a95df8dd210f4b01 (patch)
treeda8c244fd7fd7eef7a413ad8df2f19b32d4a7c52 /include/linux/relay.h
parent138c5d258cf06c278f5d7fe0a806e50fe413a08f (diff)
[PATCH] Relay: add CPU hotplug support
Mathieu originally needed to add this for tracing Xen, but it's something that's needed for any application that can be tracing while cpus are added. unplug isn't supported by this patch. The thought was that at minumum a new buffer needs to be added when a cpu comes up, but it wasn't worth the effort to remove buffers on cpu down since they'd be freed soon anyway when the channel was closed. [zanussi@us.ibm.com: avoid lock_cpu_hotplug deadlock] Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Cc: Tom Zanussi <zanussi@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/relay.h')
-rw-r--r--include/linux/relay.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/relay.h b/include/linux/relay.h
index c6a48bfc8b14..759a0f97bec2 100644
--- a/include/linux/relay.h
+++ b/include/linux/relay.h
@@ -24,7 +24,7 @@
24/* 24/*
25 * Tracks changes to rchan/rchan_buf structs 25 * Tracks changes to rchan/rchan_buf structs
26 */ 26 */
27#define RELAYFS_CHANNEL_VERSION 6 27#define RELAYFS_CHANNEL_VERSION 7
28 28
29/* 29/*
30 * Per-cpu relay channel buffer 30 * Per-cpu relay channel buffer
@@ -64,6 +64,10 @@ struct rchan
64 void *private_data; /* for user-defined data */ 64 void *private_data; /* for user-defined data */
65 size_t last_toobig; /* tried to log event > subbuf size */ 65 size_t last_toobig; /* tried to log event > subbuf size */
66 struct rchan_buf *buf[NR_CPUS]; /* per-cpu channel buffers */ 66 struct rchan_buf *buf[NR_CPUS]; /* per-cpu channel buffers */
67 int is_global; /* One global buffer ? */
68 struct list_head list; /* for channel list */
69 struct dentry *parent; /* parent dentry passed to open */
70 char base_filename[NAME_MAX]; /* saved base filename */
67}; 71};
68 72
69/* 73/*
@@ -162,7 +166,8 @@ struct rchan *relay_open(const char *base_filename,
162 struct dentry *parent, 166 struct dentry *parent,
163 size_t subbuf_size, 167 size_t subbuf_size,
164 size_t n_subbufs, 168 size_t n_subbufs,
165 struct rchan_callbacks *cb); 169 struct rchan_callbacks *cb,
170 void *private_data);
166extern void relay_close(struct rchan *chan); 171extern void relay_close(struct rchan *chan);
167extern void relay_flush(struct rchan *chan); 172extern void relay_flush(struct rchan *chan);
168extern void relay_subbufs_consumed(struct rchan *chan, 173extern void relay_subbufs_consumed(struct rchan *chan,