Skip to content

Commit 14e9911

Browse files
rddunlapJonathan Corbet
authored andcommitted
Docs: relay: editing cleanups
Cleanup some punctuation, capital letter, and a missing word in relay.rst. Signed-off-by: Randy Dunlap <[email protected]> Cc: Jonathan Corbet <[email protected]> Cc: [email protected] Cc: Andrew Morton <[email protected]> Cc: Jens Axboe <[email protected]> Cc: Tom Zanussi <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]> Message-ID: <[email protected]>
1 parent 52092c1 commit 14e9911

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

Documentation/filesystems/relay.rst

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ functions in the relay interface code - please see that for details.
3232
Semantics
3333
=========
3434

35-
Each relay channel has one buffer per CPU, each buffer has one or more
35+
Each relay channel has one buffer per CPU; each buffer has one or more
3636
sub-buffers. Messages are written to the first sub-buffer until it is
3737
too full to contain a new message, in which case it is written to
3838
the next (if available). Messages are never split across sub-buffers.
3939
At this point, userspace can be notified so it empties the first
4040
sub-buffer, while the kernel continues writing to the next.
4141

4242
When notified that a sub-buffer is full, the kernel knows how many
43-
bytes of it are padding i.e. unused space occurring because a complete
43+
bytes of it are padding, i.e., unused space occurring because a complete
4444
message couldn't fit into a sub-buffer. Userspace can use this
4545
knowledge to copy only valid data.
4646

@@ -71,7 +71,7 @@ klog and relay-apps example code
7171
================================
7272

7373
The relay interface itself is ready to use, but to make things easier,
74-
a couple simple utility functions and a set of examples are provided.
74+
a couple of simple utility functions and a set of examples are provided.
7575

7676
The relay-apps example tarball, available on the relay sourceforge
7777
site, contains a set of self-contained examples, each consisting of a
@@ -91,7 +91,7 @@ registered will data actually be logged (see the klog and kleak
9191
examples for details).
9292

9393
It is of course possible to use the relay interface from scratch,
94-
i.e. without using any of the relay-apps example code or klog, but
94+
i.e., without using any of the relay-apps example code or klog, but
9595
you'll have to implement communication between userspace and kernel,
9696
allowing both to convey the state of buffers (full, empty, amount of
9797
padding). The read() interface both removes padding and internally
@@ -119,7 +119,7 @@ mmap() results in channel buffer being mapped into the caller's
119119
must map the entire file, which is NRBUF * SUBBUFSIZE.
120120

121121
read() read the contents of a channel buffer. The bytes read are
122-
'consumed' by the reader, i.e. they won't be available
122+
'consumed' by the reader, i.e., they won't be available
123123
again to subsequent reads. If the channel is being used
124124
in no-overwrite mode (the default), it can be read at any
125125
time even if there's an active kernel writer. If the
@@ -138,7 +138,7 @@ poll() POLLIN/POLLRDNORM/POLLERR supported. User applications are
138138
notified when sub-buffer boundaries are crossed.
139139

140140
close() decrements the channel buffer's refcount. When the refcount
141-
reaches 0, i.e. when no process or kernel client has the
141+
reaches 0, i.e., when no process or kernel client has the
142142
buffer open, the channel buffer is freed.
143143
=========== ============================================================
144144

@@ -149,7 +149,7 @@ host filesystem must be mounted. For example::
149149

150150
.. Note::
151151

152-
the host filesystem doesn't need to be mounted for kernel
152+
The host filesystem doesn't need to be mounted for kernel
153153
clients to create or use channels - it only needs to be
154154
mounted when user space applications need access to the buffer
155155
data.
@@ -325,7 +325,7 @@ section, as it pertains mainly to mmap() implementations.
325325
In 'overwrite' mode, also known as 'flight recorder' mode, writes
326326
continuously cycle around the buffer and will never fail, but will
327327
unconditionally overwrite old data regardless of whether it's actually
328-
been consumed. In no-overwrite mode, writes will fail, i.e. data will
328+
been consumed. In no-overwrite mode, writes will fail, i.e., data will
329329
be lost, if the number of unconsumed sub-buffers equals the total
330330
number of sub-buffers in the channel. It should be clear that if
331331
there is no consumer or if the consumer can't consume sub-buffers fast
@@ -344,7 +344,7 @@ initialize the next sub-buffer if appropriate 2) finalize the previous
344344
sub-buffer if appropriate and 3) return a boolean value indicating
345345
whether or not to actually move on to the next sub-buffer.
346346

347-
To implement 'no-overwrite' mode, the userspace client would provide
347+
To implement 'no-overwrite' mode, the userspace client provides
348348
an implementation of the subbuf_start() callback something like the
349349
following::
350350

@@ -364,9 +364,9 @@ following::
364364
return 1;
365365
}
366366

367-
If the current buffer is full, i.e. all sub-buffers remain unconsumed,
367+
If the current buffer is full, i.e., all sub-buffers remain unconsumed,
368368
the callback returns 0 to indicate that the buffer switch should not
369-
occur yet, i.e. until the consumer has had a chance to read the
369+
occur yet, i.e., until the consumer has had a chance to read the
370370
current set of ready sub-buffers. For the relay_buf_full() function
371371
to make sense, the consumer is responsible for notifying the relay
372372
interface when sub-buffers have been consumed via
@@ -400,7 +400,7 @@ consulted.
400400

401401
The default subbuf_start() implementation, used if the client doesn't
402402
define any callbacks, or doesn't define the subbuf_start() callback,
403-
implements the simplest possible 'no-overwrite' mode, i.e. it does
403+
implements the simplest possible 'no-overwrite' mode, i.e., it does
404404
nothing but return 0.
405405

406406
Header information can be reserved at the beginning of each sub-buffer
@@ -467,7 +467,7 @@ rather than open and close a new channel for each use. relay_reset()
467467
can be used for this purpose - it resets a channel to its initial
468468
state without reallocating channel buffer memory or destroying
469469
existing mappings. It should however only be called when it's safe to
470-
do so, i.e. when the channel isn't currently being written to.
470+
do so, i.e., when the channel isn't currently being written to.
471471

472472
Finally, there are a couple of utility callbacks that can be used for
473473
different purposes. buf_mapped() is called whenever a channel buffer

0 commit comments

Comments
 (0)