connection: Increase ring buffer size to 64 kB

John Lindgren requested to merge jlindgren90/wayland:larger-buffers into main
  • Increase the maximum size of connection ring buffers to 64 kB
  • Attempt to flush ring buffers when size reaches 4 kB (as before)
  • Loop within wl_connection_read() until buffer is full or EAGAIN

Fixes weston#589.

This is an alternative approach to !188.

!188 may be the more complete fix long-term, but has some drawbacks:

  1. it adds complexity and new bugs (see ofourdan/wayland!1 (closed) for some examples)
  2. it adds new API, which compositors must adopt to completely fix the issue

At the cost of some additional memory usage, this alternative approach fixes the issue without too much added complexity and without requiring compositor-side changes.

Merge request reports