linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] input: evdev: Dynamic buffers
@ 2010-05-28 15:10 Henrik Rydberg
  2010-05-28 15:10 ` [PATCH 1/3] input: evdev: use multi-reader buffer to save space Henrik Rydberg
  0 siblings, 1 reply; 6+ messages in thread
From: Henrik Rydberg @ 2010-05-28 15:10 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: linux-input, Jiri Kosina, Mika Kuoppala, Benjamin Tissoires,
	Rafi Rubin, Henrik Rydberg

Hi Dmitry,

Here is a first stab at the problem of overrun buffers in evdev, when
running MT devices.

The approach is to first convert the current evdev client fifos to a
single multi-reader buffer, to save memory and increase resilience
towards many listeners. Locking is sparsely utilized in favor of
atomic operations, and there might be a memory barrier missing.  In
the second patch, the (single) static buffer is converted to a dynamic
one, leaving the current buffer size intact. The third patch
introduces the events_per_packet interface in input_dev, and utilizes
the information to compute the evdev buffer size.

The patches are lightly tested, anticipating some discussion.

Cheers,
Henrik

---

Henrik Rydberg (3):
  input: evdev: use multi-reader buffer to save space
  input: evdev: convert to dynamic event buffer
  input: use driver hint to compute the evdev buffer size

 drivers/input/evdev.c |   82 ++++++++++++++++++++++++++++++------------------
 include/linux/input.h |    7 ++++
 2 files changed, 58 insertions(+), 31 deletions(-)


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-05-28 18:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-28 15:10 [PATCH 0/3] input: evdev: Dynamic buffers Henrik Rydberg
2010-05-28 15:10 ` [PATCH 1/3] input: evdev: use multi-reader buffer to save space Henrik Rydberg
2010-05-28 15:10   ` [PATCH 2/3] input: evdev: convert to dynamic event buffer Henrik Rydberg
2010-05-28 15:10     ` [PATCH 3/3] input: use driver hint to compute the evdev buffer size Henrik Rydberg
2010-05-28 18:10   ` [PATCH 1/3] input: evdev: use multi-reader buffer to save space Dmitry Torokhov
2010-05-28 18:34     ` Henrik Rydberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).