]> git.baikalelectronics.ru Git - kernel.git/commit
n_tty: Separate buffer indices to prevent cache-line sharing
authorPeter Hurley <peter@hurleysoftware.com>
Sat, 15 Jun 2013 13:14:30 +0000 (09:14 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jul 2013 23:43:02 +0000 (16:43 -0700)
commit55bbe177e31fd6b200b8d967ad85a8138a54b4a4
tree503946923a498b938aa849457310ceedaefbd806
parent7a354a5f2bdfb768a963bb2376b7a1725ae0fec1
n_tty: Separate buffer indices to prevent cache-line sharing

If the read buffer indices are in the same cache-line, cpus will
contended over the cache-line (so called 'false sharing').

Separate the producer-published fields from the consumer-published
fields; document the locks relevant to each field.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/n_tty.c