<div dir="ltr"><div dir="ltr">Hi,<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 21, 2024 at 4:21 PM jleivent <<a href="mailto:jleivent@comcast.net">jleivent@comcast.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I've been looking into some of the issues about allowing the socket's<br>
kernel buffer to run out of space, and was wondering why not simply<br>
remove MSG_DONTWAIT from the sendmsg call in wl_connection_flush?  That<br>
should implement flow control by having the sender thread wait until<br>
the receiver has emptied the socket's buffer sufficiently.<br>
<br>
It seems to me that using an unbounded buffer could cause memory<br>
resource problems on whichever end was using that buffer.<br>
<br>
Was removing MSG_DONTWAIT from the sendmsg call considered and abandoned<br>
for some reason?<br></blockquote><div><br></div><div>See this thread [1] from 2012, it might give some hint on why MSG_DONTWAIT was added with commit  b26774da [2].</div><div><br></div><div>HTH</div><div>Olivier<br></div><div><br></div><div>[1] <a href="https://lists.freedesktop.org/archives/wayland-devel/2012-February/002394.html">https://lists.freedesktop.org/archives/wayland-devel/2012-February/002394.html</a></div><div>[2] <a href="https://gitlab.freedesktop.org/wayland/wayland/-/commit/b26774da">https://gitlab.freedesktop.org/wayland/wayland/-/commit/b26774da</a></div><div><br></div><div><br></div></div></div>