Lines Matching refs:channel

8 A 'relay channel' is a kernel->user data relay mechanism implemented
9 as a set of per-cpu kernel buffers ('channel buffers'), each
11 clients write into the channel buffers using efficient write
12 functions; these automatically log into the current cpu's channel
16 are associated with the channel buffers using the API described below.
18 The format of the data logged into the channel buffers is completely
32 Each relay channel has one buffer per CPU, each buffer has one or more
47 A relay channel can operate in a mode where it will overwrite data not
50 The relay channel itself does not provide for communication of such
58 the channel buffers, special-purpose communication between kernel and
82 kernel which allow writing formatted text or raw data to a channel,
83 regardless of whether a channel to write into exists or not, or even
96 used to drain the channel buffers, special-purpose communication
99 some channel though.
108 access to relay channel buffer data. Here are the file operations
111 open() enables user to open an _existing_ channel buffer.
113 mmap() results in channel buffer being mapped into the caller's
117 read() read the contents of a channel buffer. The bytes read are
119 again to subsequent reads. If the channel is being used
122 channel is being used in overwrite mode and there are
123 active channel writers, results may be unpredictable -
124 users should make sure that all logging to the channel has
129 sendfile() transfer data from a channel buffer to an output file
136 close() decrements the channel buffer's refcount. When the refcount
138 buffer open, the channel buffer is freed.
157 channel management functions:
165 channel management typically called on instigation of userspace:
189 Creating a channel
192 relay_open() is used to create a channel, along with its per-cpu
193 channel buffers. Each channel buffer will have an associated file
202 structure they create, when the channel is closed - again the host
206 In order for a channel to be created and the host filesystem's files
207 associated with its channel buffers, the user must provide definitions
211 to represent the corresponding channel buffer. The callback should
212 return the dentry of the file created to represent the channel buffer.
256 If the create_buf_file() callback fails, or isn't defined, channel
271 depending on the channel mode being used.
285 normal channel-writing functions, e.g. relay_write(), can still be
293 user-defined data with a channel, and is immediately available
303 cases, one may open a buffer-only channel and then call
315 interface to retrieve channel data, you can ignore the details of this
323 number of sub-buffers in the channel. It should be clear that if
328 As explained above, a relay channel is made of up one or more
329 per-cpu channel buffers, each implemented as a circular buffer
331 the current sub-buffer of the channel's current per-cpu buffer via the
409 also called for the first sub-buffer when the channel is opened, to
415 Writing to a channel
418 Kernel clients write data into the current cpu's channel buffer using
431 relay_reserve() is used to reserve a slot in a channel buffer which
433 that need to write directly into a channel buffer without having to
445 Closing a channel
448 The client calls relay_close() when it's finished using the channel.
449 The channel and its associated buffers are destroyed when there are no
450 longer any references to any of the channel buffers. relay_flush()
451 forces a sub-buffer switch on all the channel buffers, and can be used
452 to finalize and process the last sub-buffers before the channel is
458 Some applications may want to keep a channel around and re-use it
459 rather than open and close a new channel for each use. relay_reset()
460 can be used for this purpose - it resets a channel to its initial
461 state without reallocating channel buffer memory or destroying
463 do so, i.e. when the channel isn't currently being written to.
466 different purposes. buf_mapped() is called whenever a channel buffer
470 the channel.