<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/tty/tty_buffer.c, branch v3.12.14</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/tty/tty_buffer.c?h=v3.12.14</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/tty/tty_buffer.c?h=v3.12.14'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-07-23T23:47:10Z</updated>
<entry>
<title>tty: Remove private constant from global namespace</title>
<updated>2013-07-23T23:47:10Z</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2013-06-15T13:36:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9114fe8ccf1871f630d2c14cd60e5f455b015459'/>
<id>urn:sha1:9114fe8ccf1871f630d2c14cd60e5f455b015459</id>
<content type='text'>
TTY_BUFFER_PAGE is only used within drivers/tty/tty_buffer.c;
relocate to that file scope.

Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: Fix unsafe vt paste_selection()</title>
<updated>2013-07-23T23:47:10Z</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2013-06-15T13:36:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a7c8d58c79853adeebf0a1ddc9c63e433b4d97f1'/>
<id>urn:sha1:a7c8d58c79853adeebf0a1ddc9c63e433b4d97f1</id>
<content type='text'>
Convert the tty_buffer_flush() exclusion mechanism to a
public interface - tty_buffer_lock/unlock_exclusive() - and use
the interface to safely write the paste selection to the line
discipline.

Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: Merge __tty_flush_buffer() into lone call site</title>
<updated>2013-07-23T23:47:09Z</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2013-06-15T13:36:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=47aa658a015440906def231f54685c4d5d49dc38'/>
<id>urn:sha1:47aa658a015440906def231f54685c4d5d49dc38</id>
<content type='text'>
__tty_flush_buffer() is now only called by tty_flush_buffer();
merge functions.

Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: Use non-atomic state to signal flip buffer flush pending</title>
<updated>2013-07-23T23:47:09Z</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2013-06-15T13:36:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0f56bd2f6a97d8b0eb5c8f9bc04b83a6c16d1d48'/>
<id>urn:sha1:0f56bd2f6a97d8b0eb5c8f9bc04b83a6c16d1d48</id>
<content type='text'>
Atomic bit ops are no longer required to indicate a flip buffer
flush is pending, as the flush_mutex is sufficient barrier.

Remove the unnecessary port .iflags field and localize flip buffer
state to struct tty_bufhead.

Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: Only perform flip buffer flush from tty_buffer_flush()</title>
<updated>2013-07-23T23:47:09Z</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2013-06-15T13:36:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d7a68be4f265be10e24be931c257af30ca55566b'/>
<id>urn:sha1:d7a68be4f265be10e24be931c257af30ca55566b</id>
<content type='text'>
Now that dropping the buffer lock is not necessary (as result of
converting the spin lock to a mutex), the flip buffer flush no
longer needs to be handled by the buffer work.

Simply signal a flush is required; the buffer work will exit the
i/o loop, which allows tty_buffer_flush() to proceed.

Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: Ensure single-threaded flip buffer consumer with mutex</title>
<updated>2013-07-23T23:47:09Z</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2013-06-15T13:36:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e9975fdec0138f1b2a85b9624e41660abd9865d4'/>
<id>urn:sha1:e9975fdec0138f1b2a85b9624e41660abd9865d4</id>
<content type='text'>
The buffer work may race with parallel tty_buffer_flush. Use a
mutex to guarantee exclusive modify access to the head flip
buffer.

Remove the unneeded spin lock.

Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: Make driver-side flip buffers lockless</title>
<updated>2013-07-23T23:47:09Z</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2013-06-15T13:36:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e8437d7ecbc50198705331449367d401ebb3181f'/>
<id>urn:sha1:e8437d7ecbc50198705331449367d401ebb3181f</id>
<content type='text'>
Driver-side flip buffer input is already single-threaded; 'publish'
the .next link as the last operation on the tail buffer so the
'consumer' sees the already-completed flip buffer.

The commit buffer index is already 'published' by driver-side functions.

Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: Track flip buffer memory limit atomically</title>
<updated>2013-07-23T23:47:08Z</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2013-06-15T13:36:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7bfe0b7116be207cf2204ae06335cc89d8f8ee02'/>
<id>urn:sha1:7bfe0b7116be207cf2204ae06335cc89d8f8ee02</id>
<content type='text'>
Lockless flip buffers require atomically updating the bytes-in-use
watermark.

The pty driver also peeks at the watermark value to limit
memory consumption to a much lower value than the default; query
the watermark with new fn, tty_buffer_space_avail().

Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: Simplify flip buffer list with 0-sized sentinel</title>
<updated>2013-07-23T23:47:08Z</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2013-06-15T13:36:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7391ee16950e772076d321792d9fbf030f921345'/>
<id>urn:sha1:7391ee16950e772076d321792d9fbf030f921345</id>
<content type='text'>
Use a 0-sized sentinel to avoid assigning the head ptr from
the driver side thread. This also eliminates testing head/tail
for NULL.

When the sentinel is first 'consumed' by the buffer work
(or by tty_buffer_flush()), it is detached from the list but not
freed nor added to the free list. Both buffer work and
tty_buffer_flush() continue to preserve at least 1 flip buffer
to which head &amp; tail is pointed.

Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: Use lockless flip buffer free list</title>
<updated>2013-07-23T23:47:08Z</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2013-06-15T13:36:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=809850b7a5fcc0a96d023e1171a7944c60fd5a71'/>
<id>urn:sha1:809850b7a5fcc0a96d023e1171a7944c60fd5a71</id>
<content type='text'>
In preparation for lockless flip buffers, make the flip buffer
free list lockless.

NB: using llist is not the optimal solution, as the driver and
buffer work may contend over the llist head unnecessarily. However,
test measurements indicate this contention is low.

Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
